-
Notifications
You must be signed in to change notification settings - Fork 1.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
Check failed: result >= enforced_min_time #2571
Comments
If I'm not wrong, this was observed on the producer cluster, so it would just be local writes (the load was just being run on producer). |
cc @amitanandaiyer as he said he had seen something similar during the index backfill work. |
Just saw this the other day in a non-CDC enabled cluster. The main differences though were:
The problem after this though was that, after a crash, the tablets failed to bootstrap! The failure message was: More importantly, this did not clear! We went through the process of removing bad data on a follower and restarting it, then it got back into the same state. This suggests the data that triggered this was messed up on the leader and the Remote Bootstrap brought it over! |
@bmatican: could you share the check failure message from the most recent occurrence of this bug with CDC disabled? |
Rewriting the original error message here, subtracting 1570720490000000 from all microsecond timestamps:
The computed safe time is 7577669 microseconds (7.57 seconds) behind previously returned safe time. |
This was the most recent failure stack @mbautin Unpacked:
Removing the common prefix (15730798) from all the microsecond numbers above:
|
One other potentially useful data point, this was a batch workload with a large batch size (so each leader would spread requests to all other TS), and TS::Write latency was slowly going up (queue backing up), and we saw the warnings of having taken 10-30000ms instead of the 3000ms timeout. |
@bmatican do we also have stack traces? |
@mbautin Unfortunately no :( |
…CppCassandraDriverTest.BatchWriteDuringSoftMemoryLimit Summary: When an operation is received by a follower, it is added to MvccManager during the "prepare" phase. But this preparing phase could be delayed under high load, so it happens after this operation is Raft-replicated. So the following scenario is possible: 1) The follower receives an operation from the leader. 2) Follower wins an election. 3) It becomes the leader and replicates operations from the old leader with a newly added no-op. 4) Operations from the old leader are being prepared. After (3) we already know that this follower is a fully functional leader, so it could return safe time equal to hybrid time lease expiration. And (4) happens after that, so we will try to register (in MvccManager) operations with hybrid times that are lower than last returned safe time, leading to a check failure and a crash. Fixed by changing the place where we register follower operations in MVCC, i.e. StartReplicaOperation. Also fixed the following issues found by the same test: 1) `RemoteTablet::GetRemoteTabletServers` could try to lock a mutex while the wait is not allowed. Fixed by allowing reading stale leader state at this point. 2) In CppCassandraDriverTest.BatchWriteDuringSoftMemoryLimit, the external mini-cluster could produce more than 50MB of logs. Increased limit to 512MB. 3) Moved partition check from `AsyncRpc` to `Batcher`, so failure would happen earlier. 4) Removed `DCHECK` for the number of `scheduled_tasks_` to be equal to zero from ServicePool. There could be a race condition when the aborted task was not yet completely aborted, while the new scheduled task is complete. So `check_timeout_task_` will be reset to `kUninitializedScheduledTaskId`, but `scheduled_tasks_` would still be non-zero. 5) Reset of `leader_no_op_committed_` before marking current node as leader. Otherwise, for a very short period of time, we will have an invalid value of `leader_no_op_committed_` from previous leadership. 6) Fix race condition in `Batcher` when `FlushBuffersIfReady` is performed twice. Disallow `FlushBuffersIfReady` in `kTransactionReady` state, and introduce new function `ExecuteOperations` to complete `Batcher` after transaction is ready. Test Plan: ybd asan --cxx-test cassandra_cpp_driver-test --gtest_filter CppCassandraDriverTest.BatchWriteDuringSoftMemoryLimit -n 20 Reviewers: bogdan, timur, mikhail Reviewed By: mikhail Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D7560
@spolitov I'm still able to run into this on the master, if we have txn-writes, and non-txn-writes going to the same table. here's a simple repro.
|
|
Summary: During conflict resolution committing transaction has commit time HybridTime::kMax. And we use this time to update clock after resolving operation conflicts. This diff fixes issue by ignoring max hybrid time for clock update. Test Plan: ybd --cxx-test ql-transaction-test --gtest_filter QLTransactionTest.MixedWriteConflicts Reviewers: amitanand, mikhail, timur Reviewed By: timur Subscribers: ybase, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D7779
Saw this on a 2DC enabled cluster:
Unpacking the CHECK failure message:
The text was updated successfully, but these errors were encountered: