summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-07 16:17:10 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-06-07 16:17:10 +0200
commit627300a657082c0e4d9104cf70a8f4f01ce40d7b (patch)
tree0eea9a9bb9e15b5d83fc045b4fc96bb9ffc1c753 /storageapi
parent7b29da0d2943f2aa9e1c6601a538cd4ba0d100be (diff)
Update with TODO
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/storagemessage.cpp9
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;
}