-
Notifications
You must be signed in to change notification settings - Fork 466
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
chore(enhancement): rename is_txn_mode to txn_context_enabled #2644
base: unstable
Are you sure you want to change the base?
Conversation
WriteBatchIndexer handle(ctx); | ||
auto s = updates->Iterate(&handle); | ||
if (!s.ok()) return s; | ||
ctx.batch = nullptr; |
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.
Why do we need to clear ctx.batch if it's not null?
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.
comment aboved
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.
Got it.
And why do we now avoid to create a new write batch if ctx.batch is null?
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.
Ahh I think no actually write happens so we can omit it.
A bug exists in this refactor, will dive into it tomorrow |
is_txn_mode
is used both in storage and Context, so renaming the argument