Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[authority_store] Schedule certificate after acquiring tx lock (#4365)
We currently schedule certificate for execution and then acquire tx lock. This opens a relatively small possibility for race condition where execution driver will pick up and lock transaction before we can do that in `persist_certificate_and_lock_shared_objects`. This would not be end of the world, but it would waste time and produce noisy error in logs since execution driver will fail because `assigned_object_versions` was not yet updated. Simple one line fix is to move scheduling after lock is acquired so that `assigned_object_versions` will be ready for execution driver when it will be able to acquire a lock. We can't just move `add_pending_certificates` to the end of this function since we want to make sure transaction is scheduled for execution by the time `consensus_message_processed` is updated.
- Loading branch information