summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-12-21 15:53:56 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-12-21 15:53:56 +0000
commita30a19e95b7e37e5f8ed4ecbdb4067411b06548b (patch)
treef51ca36d0a257efd71eb57b4d70b6ee67e440cfa
parenta3d5e2ce14352ab181e940574f6e1a99d40cd520 (diff)
Move close() call up between interrupt() and join().
That enables faster join since close will wake up the interrupted threads.
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
index 6d69a29fc6e..cbb0fa1f0de 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
@@ -105,13 +105,14 @@ FileStorManager::~FileStorManager()
thread->getThread().interrupt();
}
}
+ LOG(debug, "Closing all filestor queues, answering queued messages. New messages will be refused.");
+ _filestorHandler->close();
for (const auto & thread : _threads) {
if (thread) {
thread->getThread().join();
}
}
- LOG(debug, "Closing all filestor queues, answering queued messages. New messages will be refused.");
- _filestorHandler->close();
+
LOG(debug, "Deleting filestor threads. Waiting for their current operation "
"to finish. Stop their threads and delete objects.");
_threads.clear();