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: CosmosDB EntriesIterator #8367

Merged
merged 4 commits into from
Nov 14, 2024
Merged

Conversation

N-o-Z
Copy link
Member

@N-o-Z N-o-Z commented Nov 14, 2024

Closes #8366

Change Description

Background

lakeFS panics due to nil pointer dereference in CosmosDB's EntriesIterator

Bug Fix

The cause of the bug is trying to access a member of a pointer without checking pointer validity
As hard as I tried, I was not able to reproduce the issue and therefore fixed the code itself but not the reason for it.
This might not be reproducible using the CosmosDB emulator.
On the bright side - I've re-enabled the CosmosDB acceptance tests in the hope that this will improve our quality

Testing Details

Ran the CosmosDB KV acceptance tests

Breaking Change?

No

@N-o-Z N-o-Z added bug Something isn't working include-changelog PR description should be included in next release changelog labels Nov 14, 2024
@N-o-Z N-o-Z requested review from itaiad200 and guy-har November 14, 2024 03:12
@N-o-Z N-o-Z self-assigned this Nov 14, 2024
Copy link

E2E Test Results - DynamoDB Local - Local Block Adapter

13 passed

Copy link

E2E Test Results - Quickstart

11 passed

Copy link
Contributor

@guy-har guy-har left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 462 to 464
if e.entry != nil {
e.startKey = e.entry.Key
}
Copy link
Contributor

Choose a reason for hiding this comment

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

just a thought - but maybe we would want to log it in case this happens - just to help understand the case and how to reproduce

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a great idea!

@N-o-Z N-o-Z enabled auto-merge (squash) November 14, 2024 21:09
@N-o-Z N-o-Z merged commit caa565e into master Nov 14, 2024
38 checks passed
@N-o-Z N-o-Z deleted the fix/cosmosdb-entries-iterator-8366 branch November 14, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working include-changelog PR description should be included in next release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Occasional CosmosDB panic in handleBatchSizeChange
2 participants