Skip to content

Conversation

adiholden
Copy link
Contributor

No description provided.

@adiholden adiholden requested a review from romange January 18, 2024 13:40
PrimeTable* pt = db_slice_.GetTables(db_index).first;
if (!it.IsOccupied() || it->first != key) {
res_it = pt->Find(key);
CHECK(!res_it.is_done());
Copy link
Collaborator

Choose a reason for hiding this comment

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

add a comment explaining why this check always holds.

@@ -50,6 +50,11 @@ class TieredStorage {

void WriteSingle(DbIndex db_index, PrimeIterator it, size_t blob_len);

// Returns a pair consisting of an bool denoting whether we can write to disk, and updated
// iterator as this function can yield.
Copy link
Collaborator

Choose a reason for hiding this comment

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

... 'it' should not be used after the call to this function.

romange
romange previously approved these changes Jan 18, 2024
Signed-off-by: adi_holden <[email protected]>
@adiholden adiholden merged commit cdbeb2f into main Jan 21, 2024
@adiholden adiholden deleted the update_it_after_await branch January 21, 2024 09:01
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.

2 participants