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

[BUG] NumericRangeIterator_OnReopen is not implemented #3171

Merged
merged 15 commits into from
Nov 17, 2022
Merged

Conversation

ashtul
Copy link
Contributor

@ashtul ashtul commented Oct 24, 2022

This causes a crash if a numeric tree has a split of a leaf node which invalidates the inverted index held by the IndexReader.

MOD-4255
MOD-4296

src/numeric_index.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@MeirShpilraien MeirShpilraien left a comment

Choose a reason for hiding this comment

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

Some comments

@oshadmi oshadmi changed the title [BUG] NumericRangeIterator_OnReopen is nmot implemented [BUG] NumericRangeIterator_OnReopen is not implemented Oct 26, 2022
if (ir->gcMarker == ir->idx->gcMarker) {
// no GC - we just go to the same offset we were at
size_t offset = ir->br.pos;
ir->br = NewBufferReader(&ir->idx->blocks[ir->currentBlock].buf);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe the ir->idx itself might be already freed here

Copy link
Contributor Author

@ashtul ashtul left a comment

Choose a reason for hiding this comment

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

src/numeric_index.c Show resolved Hide resolved
src/numeric_index.c Show resolved Hide resolved
MeirShpilraien
MeirShpilraien previously approved these changes Oct 27, 2022
@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Base: 82.55% // Head: 82.49% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (07109b3) compared to base (0a0c53a).
Patch coverage: 8.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3171      +/-   ##
==========================================
- Coverage   82.55%   82.49%   -0.06%     
==========================================
  Files         181      181              
  Lines       30119    30142      +23     
==========================================
+ Hits        24864    24866       +2     
- Misses       5255     5276      +21     
Impacted Files Coverage Δ
src/numeric_index.c 71.58% <8.33%> (-3.36%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

env.expect('HSET', 'doc1', 'test', '1').equal(1)
env.expect('HSET', 'doc2', 'test', '2').equal(1)
conn.execute_command('HSET', 'doc1', 'test', '1')
conn.execute_command('HSET', 'doc2', 'test', '2')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why changing that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You are skipping on cluster so not sure why you change it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MeirShpilraien
It is a new test and I often use the conn. Syntax to avoid confusion.
Would you like me to switch?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, just wonder why you changed it.

Copy link
Collaborator

@MeirShpilraien MeirShpilraien left a comment

Choose a reason for hiding this comment

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

One question

@ashtul ashtul merged commit b3075a5 into master Nov 17, 2022
@ashtul ashtul deleted the ariel_cursor-bug branch November 17, 2022 13:06
ashtul added a commit that referenced this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants