Skip to content

Queue replication jobs in case a transaction is unused

Patrick Steinhardt requested to merge pks-transaction-replicate-unused into master

When a transaction was created, but no vote happened we currently raise an error because we assume the primary failed to vote correctly. That's fine as long as we allow only a small set of RPCs to use transactions where we know they'll hook into the transaction, but as soon as we expand the scope it's going to break down in case there's any RPC that doesn't perform a reference modification and thus won't cast a vote.

Fix this by discerning the case where the primary failed the vote and the case where a transaction that is completely unused. The latter is indicated by the fact that no subtransaction was created because no node cast a vote, while the former should only happen in case there was at least one subtransaction. While it makes sense to continue raising an error on such transactions where the primary really failed to vote, we should assume that the RPC simply wasn't aware of transactions on unused transactions. As such, the best we can do here it to schedule a replication job in case any modification happent that went unnoticed.

Fixes #2955 (closed)

Merge request reports