diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-01-11 10:45:19 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-01-11 10:45:19 +0000 |
commit | 88198e860dbf6429442590dbe78d0f6b4b3c88b3 (patch) | |
tree | 2779d143885c655df4324fae05faedfd36fdbe62 /storage | |
parent | 23faf0d6c74493b9efc602cb94cb90246ac61fd9 (diff) |
copy out the stuff you access after erasing the node.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 7ce7f60daf8..a2d5ce1a647 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -631,10 +631,11 @@ FileStorHandlerImpl::getMessage(vespalib::MonitorGuard & guard, Disk & t, Priori m.toString().c_str(), waitTime, static_cast<api::StorageCommand &>(m).getTimeout()); std::shared_ptr<api::StorageMessage> msg = std::move(iter->_command); + document::BucketId bucketId(iter->_bucketId); idx.erase(iter); // iter not used after this point. if (!messageTimedOutInQueue(*msg, waitTime)) { - auto locker = takeDiskBucketLockOwnership(guard, t, iter->_bucketId, *msg); + auto locker = takeDiskBucketLockOwnership(guard, t, bucketId, *msg); guard.unlock(); MBUS_TRACE(trace, 9, "FileStorHandler: Got lock on bucket"); return std::move(FileStorHandler::LockedMessage(std::move(locker), std::move(msg))); |