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
[MOD-4830] Fixing numric range cursor #3552
Conversation
…vented cursor from immediately aborting iteration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Few comments
…-cursor' into ephriam_fix-numeric-cursor
d = {res[i]: res[i + 1] for i in range(0, len(res), 2)} | ||
return d | ||
|
||
from cmath import inf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401: 'cmath.inf' imported but unused
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
d = {res[i]: res[i + 1] for i in range(0, len(res), 2)} | ||
return d | ||
|
||
from cmath import inf | ||
|
||
def loadDocs(env, count=100, idx='idx', text='hello world'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302: expected 2 blank lines, found 1
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
tests/pytests/test_cursors.py
Outdated
@@ -78,7 +74,8 @@ def testMultipleIndexes(env): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F405: 'waitForIndex' may be undefined, or defined from star imports: common, includes
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
res, cursor = env.cmd('FT.CURSOR', 'READ', idx, str(cursor)) | ||
env.assertEqual(res, [0]) | ||
env.assertEqual(cursor, 0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W391: blank line at end of file
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
src/numeric_index.c
Outdated
|
||
if (!rt || rt->revisionId != nu->lastRevId) { | ||
if (!rt || rt->revisionId != nu->lastRevId /* || ir->gcMarker != ir->idx->gcMarker */) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temp fix just for releasing a milestone
if (!rt || rt->revisionId != nu->lastRevId /* || ir->gcMarker != ir->idx->gcMarker */) { | |
if (!rt || rt->revisionId != nu->lastRevId || ir->gcMarker != ir->idx->gcMarker) { |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3552 +/- ##
==========================================
- Coverage 82.46% 82.36% -0.10%
==========================================
Files 191 190 -1
Lines 31290 31143 -147
==========================================
- Hits 25804 25652 -152
- Misses 5486 5491 +5
☔ View full report in Codecov by Sentry. |
* fixed formatting of fieldname so that it will be found correctly. prevented cursor from immediately aborting iteration * & * test * avoiding alloc by lookup in fieldspec * fixed ENUM * adding include to test * Fix to Github Action * Fix to Github Action (2) * more pythonic test syntax * fixes 1 * fixes 2 * fixes 3 * bandaid * bandaid * split NumericUnion into Numeric and Union cases * update deps and consmetic --------- Co-authored-by: Rafi Einstein <rafi@redislabs.com> Co-authored-by: oshadmi <omer.shadmi@redislabs.com> (cherry picked from commit 763f3ad)
MOD-4830
Fixed formatting of fieldname so that it will be found correctly. Prevented cursor from immediately aborting iteration.
Also handle
IndexReader_Reopen
with Union Iterator.