-
Notifications
You must be signed in to change notification settings - Fork 998
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(server): Fix bugs #797
Conversation
dranikpg
commented
Feb 14, 2023
•
edited
Loading
edited
- Fix replica offset
- Remove old tx offset
Signed-off-by: Vladislav Oleshko <[email protected]>
Signed-off-by: Vladislav Oleshko <[email protected]>
util::fibers_ext::Fiber write_fb_{}; | ||
JournalWriter writer_{this}; | ||
|
||
std::atomic_uint64_t record_cnt_{0}; |
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.
This was not initialized and thus its value was just random
|
||
print(" offset", syncid.decode(), r_offset, m_offset) | ||
return r_offset == m_offset |
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 now print to so we can see whether the replica is deadlocked, just slow or whether they're out of sync at all
tasks = (asyncio.create_task(check_replica_finished_exec(c, c_master)) for c in waiting_for) | ||
finished_list = await asyncio.gather(*tasks) | ||
|
||
# Remove clients that finished from waiting list | ||
waiting_for = [c for (c, finished) in zip(waiting_for, finished_list) if not finished] |
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.
And to avoid printing a lot, I now check each time only the remaining replicas, not all
@@ -382,7 +382,6 @@ void EngineShard::PollExecution(const char* context, Transaction* trans) { | |||
// after trans in the queue, hence it's safe to run trans out of order. | |||
if (trans && should_run) { | |||
DCHECK(trans != head); | |||
DCHECK(!trans->IsMulti()); // multi, global transactions can not be OOO. |
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 did you remove this check now?
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.
- it fails on python tests. which is good because
- We added an option to run multi transactions as OOO if at moment of their scheduling, they are exclusive owners of the lock.
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.
Because we now support OOO for multi, but this branch was never called with a lot of shards because of low throughput, so I didn't notice it
LGTM for c++ fixes. |