Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check index for next word and replace global index with local one #8719

Merged
merged 3 commits into from
Mar 4, 2023

Conversation

hezhizhen
Copy link
Contributor

Problem

nextWord() used a global index and simply got the word from the list based on the index without checking if it's in the range.

Solution

Pass the index as an argument to the function and let the callers maintain the index themselves (increase it here), and check if the index is valid.

I also fixed some typo and comments by the way.

@dgraph-bot dgraph-bot added area/bulk-loader Issues related to bulk loading. area/core internal mechanisms area/documentation Documentation related issues. area/graphql Issues related to GraphQL support on Dgraph. area/integrations Related to integrations with other projects. area/live-loader Issues related to live loading. area/testing Testing related issues go Pull requests that update Go code labels Mar 3, 2023
@hezhizhen
Copy link
Contributor Author

@skrdgraph

Copy link
Member

@mangalaman93 mangalaman93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment, LG otherwise. Thanks for the PR

contrib/integration/swap/main.go Outdated Show resolved Hide resolved
@hezhizhen
Copy link
Contributor Author

@mangalaman93 I need some help to pass the failed tests.

@mangalaman93
Copy link
Member

rerunning the failed test. It is failing due to a known issue, we are looking into it.

@hezhizhen
Copy link
Contributor Author

rerunning the failed test. It is failing due to a known issue, we are looking into it.

@mangalaman93 How can I re-run failed tests?

@mangalaman93 mangalaman93 merged commit 7a1db42 into hypermodeinc:main Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bulk-loader Issues related to bulk loading. area/core internal mechanisms area/documentation Documentation related issues. area/graphql Issues related to GraphQL support on Dgraph. area/integrations Related to integrations with other projects. area/live-loader Issues related to live loading. area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

4 participants