summaryrefslogtreecommitdiffstats
path: root/vespa-maven-plugin/README.md
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2023-04-28 09:13:37 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2023-04-28 11:22:15 +0000
commit62778dab5c5ec29b3afb1231e3b4e94f1548142f (patch)
tree65f456351b936ad299b0ccc4d14788f50923cea5 /vespa-maven-plugin/README.md
parentefebd9ea2938466b0f6912365cf9bbb7b6253541 (diff)
Ensure process-internal message ID uniqueness
When a storage API command is created internally on a node it is always assigned a strictly increasing message ID that is guaranteed to be unique within the process. Some parts of the code use this as a way to distinguish messages from another. However, uniqueness (prior to this commit) did not necessarily hold, as the underlying wire protocol would inherit message IDs _from other nodes_ and override the generated ID with this. I.e. uniqueness no longer holds. This had exciting consequences when the stars aligned and a remote node sent the same ID as one generated at the same time internally on the receiver node. Luckily, in practice this would only be used in a potentially ambiguous context when sanity checking shared read lock sets for the _same bucket_ in the persistence threads. Invariant checks would detect this is as an attempted duplicate lock acquisition and abort the process. This has been latent for many, many years, but we've seen it happen exactly once. This commit introduces an explicit domain separation between the node-internal (locally unique) IDs and the ID used by the originator. The originator ID is maintained and returned over the wire to the caller when sending a response to the incoming request. Curiously, we don't actually need this originator ID at all since the caller maintains explicit state containing the sender command. Unfortunately we can't simply remove it, since versions prior to this commit will still use whatever's on the wire.
Diffstat (limited to 'vespa-maven-plugin/README.md')
0 files changed, 0 insertions, 0 deletions