diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-07 16:17:10 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-07 16:17:10 +0200 |
commit | 627300a657082c0e4d9104cf70a8f4f01ce40d7b (patch) | |
tree | 0eea9a9bb9e15b5d83fc045b4fc96bb9ffc1c753 | |
parent | 7b29da0d2943f2aa9e1c6601a538cd4ba0d100be (diff) |
Update with TODO
-rw-r--r-- | storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp b/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp index 93c65e6c745..399a30543da 100644 --- a/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp +++ b/storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp @@ -13,6 +13,15 @@ namespace storage::api { namespace { +/** + * TODO + * From @vekterli + * I have no idea why the _lastMsgId update code masks away the 8 MSB, but if we assume it's probably for no + * overwhelmingly good reason we could replace this mutex with just a std::atomic<uint64_t> and do a relaxed + * fetch_add (shouldn't be any need for any barriers; ID increments have no other memory dependencies). U64 overflows + * here come under the category "never gonna happen in the real world". + * @balder agree - @vekterli fix in separate pull request :) + */ vespalib::Lock _G_msgIdLock; } |