summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-01 14:06:44 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-01 14:06:44 +0000
commit4796fb920b45b26f2505babe02de0c93942c3e73 (patch)
tree271e53d81f869fe4e467b3da6bc32d2253f64e5c /storage
parentc0e949b12fdcdcb40f65d6898bc0c41689f0ff3f (diff)
timeout_end -> deadline
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandler.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp10
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h4
-rw-r--r--storage/src/vespa/storage/persistence/persistencethread.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h
index 250bbe369c9..dfeab4c0ee1 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h
@@ -171,7 +171,7 @@ public:
*
* @param stripe The stripe to get messages for
*/
- virtual LockedMessage getNextMessage(uint32_t stripeId, vespalib::steady_time timeout_end) = 0;
+ virtual LockedMessage getNextMessage(uint32_t stripeId, vespalib::steady_time deadline) = 0;
/** Only used for testing, should be removed */
LockedMessage getNextMessage(uint32_t stripeId) {
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index 77617cecad3..b42699a0efe 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -375,13 +375,13 @@ FileStorHandlerImpl::makeQueueTimeoutReply(api::StorageMessage& msg)
}
FileStorHandler::LockedMessage
-FileStorHandlerImpl::getNextMessage(uint32_t stripeId, vespalib::steady_time timeout_end)
+FileStorHandlerImpl::getNextMessage(uint32_t stripeId, vespalib::steady_time deadline)
{
if (!tryHandlePause()) {
return {}; // Still paused, return to allow tick.
}
- return _stripes[stripeId].getNextMessage(timeout_end);
+ return _stripes[stripeId].getNextMessage(deadline);
}
std::shared_ptr<FileStorHandler::BucketLockInterface>
@@ -917,7 +917,7 @@ FileStorHandlerImpl::Stripe::operation_type_should_be_throttled(api::MessageType
}
FileStorHandler::LockedMessage
-FileStorHandlerImpl::Stripe::getNextMessage(vespalib::steady_time timeout_end)
+FileStorHandlerImpl::Stripe::getNextMessage(vespalib::steady_time deadline)
{
std::unique_lock guard(*_lock);
ThrottleToken throttle_token;
@@ -953,12 +953,12 @@ FileStorHandlerImpl::Stripe::getNextMessage(vespalib::steady_time timeout_end)
// Depending on whether we were blocked due to no usable ops in queue or throttling,
// wait for either the queue or throttler to (hopefully) have some fresh stuff for us.
if (!was_throttled) {
- _cond->wait_until(guard, timeout_end);
+ _cond->wait_until(guard, deadline);
} else {
// Have to release lock before doing a blocking throttle token fetch, since it
// prevents RPC threads from pushing onto the queue.
guard.unlock();
- throttle_token = _owner.operation_throttler().blocking_acquire_one(timeout_end);
+ throttle_token = _owner.operation_throttler().blocking_acquire_one(deadline);
guard.lock();
if (!throttle_token.valid()) {
_metrics->timeouts_waiting_for_throttle_token.inc();
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
index c18b51c5d10..74830a9d599 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
@@ -132,7 +132,7 @@ public:
std::shared_ptr<FileStorHandler::BucketLockInterface> lock(const document::Bucket & bucket, api::LockingRequirements lockReq);
void failOperations(const document::Bucket & bucket, const api::ReturnCode & code);
- FileStorHandler::LockedMessage getNextMessage(vespalib::steady_time timeout_end);
+ FileStorHandler::LockedMessage getNextMessage(vespalib::steady_time deadline);
void dumpQueue(std::ostream & os) const;
void dumpActiveHtml(std::ostream & os) const;
void dumpQueueHtml(std::ostream & os) const;
@@ -203,7 +203,7 @@ public:
bool schedule(const std::shared_ptr<api::StorageMessage>&) override;
ScheduleAsyncResult schedule_and_get_next_async_message(const std::shared_ptr<api::StorageMessage>& msg) override;
- FileStorHandler::LockedMessage getNextMessage(uint32_t stripeId, vespalib::steady_time timeout_end) override;
+ FileStorHandler::LockedMessage getNextMessage(uint32_t stripeId, vespalib::steady_time deadline) override;
void remapQueueAfterJoin(const RemapInfo& source, RemapInfo& target) override;
void remapQueueAfterSplit(const RemapInfo& source, RemapInfo& target1, RemapInfo& target2) override;
diff --git a/storage/src/vespa/storage/persistence/persistencethread.cpp b/storage/src/vespa/storage/persistence/persistencethread.cpp
index 208481bde27..8e1fdb06ded 100644
--- a/storage/src/vespa/storage/persistence/persistencethread.cpp
+++ b/storage/src/vespa/storage/persistence/persistencethread.cpp
@@ -38,8 +38,8 @@ PersistenceThread::run(framework::ThreadHandle& thread)
vespalib::steady_time now = vespalib::steady_clock::now();
thread.registerTick(framework::UNKNOWN_CYCLE, now);
- vespalib::steady_time doom = now + max_wait_time;
- FileStorHandler::LockedMessage lock(_fileStorHandler.getNextMessage(_stripeId, doom));
+ vespalib::steady_time deadline = now + max_wait_time;
+ FileStorHandler::LockedMessage lock(_fileStorHandler.getNextMessage(_stripeId, deadline));
if (lock.lock) {
_persistenceHandler.processLockedMessage(std::move(lock));