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

[MOD-4830] Fixing numric range cursor #3552

Merged
merged 19 commits into from May 30, 2023
Merged

Conversation

ephraimfeldblum
Copy link
Collaborator

@ephraimfeldblum ephraimfeldblum commented May 2, 2023

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.

…vented cursor from immediately aborting iteration
Copy link
Collaborator

@oshadmi oshadmi left a 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

tests/pytests/test_cursors.py Outdated Show resolved Hide resolved
tests/pytests/test_cursors.py Outdated Show resolved Hide resolved
tests/pytests/test_cursors.py Outdated Show resolved Hide resolved
src/numeric_index.c Outdated Show resolved Hide resolved
d = {res[i]: res[i + 1] for i in range(0, len(res), 2)}
return d

from cmath import inf
Copy link

Choose a reason for hiding this comment

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

9% of developers fix this issue

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'):
Copy link

Choose a reason for hiding this comment

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

8% of developers fix this issue

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.

@@ -78,7 +74,8 @@ def testMultipleIndexes(env):
Copy link

Choose a reason for hiding this comment

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

3% of developers fix this issue

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)

Copy link

Choose a reason for hiding this comment

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

22% of developers fix this issue

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.


if (!rt || rt->revisionId != nu->lastRevId) {
if (!rt || rt->revisionId != nu->lastRevId /* || ir->gcMarker != ir->idx->gcMarker */) {
Copy link
Collaborator

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

Suggested change
if (!rt || rt->revisionId != nu->lastRevId /* || ir->gcMarker != ir->idx->gcMarker */) {
if (!rt || rt->revisionId != nu->lastRevId || ir->gcMarker != ir->idx->gcMarker) {

oshadmi
oshadmi previously approved these changes May 29, 2023
@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Patch coverage: 65.00% and project coverage change: -0.10 ⚠️

Comparison is base (dc56844) 82.46% compared to head (dd6f8f0) 82.36%.

❗ Current head dd6f8f0 differs from pull request most recent head bea4b97. Consider uploading reports for the commit bea4b97 to get more accurate results

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     
Impacted Files Coverage Δ
src/index.c 84.28% <60.00%> (-0.47%) ⬇️
src/numeric_index.c 73.51% <66.66%> (-0.85%) ⬇️

... and 33 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@oshadmi oshadmi merged commit 763f3ad into master May 30, 2023
12 checks passed
@oshadmi oshadmi deleted the ephriam_fix-numeric-cursor branch May 30, 2023 16:33
rafie pushed a commit that referenced this pull request Jun 8, 2023
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants