How to get primary id from within a transaction #4337
Unanswered
Andrew Jeffery (jeffa5)
asked this question in
Q&A
Replies: 1 comment 1 reply
|
The reason this isn't exposed is that the primary changes outside of the transaction order. So different nodes may return different primaries for otherwise identical requests. We're wary of letting apps make decisions within a transaction that depend on their (transient, local) opinion of the current primary. What's the use case? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
When executing a transaction (or on a command endpoint), it would be useful to be able to get the id of the leader (primary), similar to https://microsoft.github.io/CCF/main/operations/operator_rpc_api.html#get--node-consensus provides.
I can't see a way to get it from the internal map either and the logic the above endpoint uses isn't exposed.
All reactions