-
Notifications
You must be signed in to change notification settings - Fork 1k
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: prevent tx_executor reading from sock if operation is canceled #4704
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -866,11 +866,8 @@ void DflyShardReplica::StableSyncDflyReadFb(ExecutionState* cntx) { | |
|
||
acks_fb_ = fb2::Fiber("shard_acks", &DflyShardReplica::StableSyncDflyAcksFb, this, cntx); | ||
|
||
while (cntx->IsRunning()) { | ||
auto tx_data = tx_reader.NextTxData(&reader, cntx); | ||
if (!tx_data) | ||
break; | ||
|
||
std::optional<TransactionData> tx_data; | ||
while ((tx_data = tx_reader.NextTxData(&reader, cntx))) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here it looks like we did not call the NextTxData if the cntx was closed.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no problem here. just decided to make it shorter |
||
DVLOG(3) << "Lsn: " << tx_data->lsn; | ||
|
||
last_io_time_ = Proactor()->GetMonotonicTimeNs(); | ||
|
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 you need this?
if there is no transaction data you need to report error? if its not running doesnt it mean that error was already reported?
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.
we do report inside tx_reader.NextTxData(&reader, cntx); If the cntx is canceled we don't need report. If we have error it is already reported
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.
So why do you need this?
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.
I didn't get the question. I'v removed it, because we don't need it
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.
ops sorry my eys are playing with me