Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/iocore/cache/StripeSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ StripeSM::shutdown(EThread *shutdown_thread)
// the process is going down, do a blocking call
// dont release the volume's lock, there could
// be another aggWrite in progress
MUTEX_TAKE_LOCK(this->mutex, shutdown_thread);
SCOPED_MUTEX_LOCK(lock, this->mutex, shutdown_thread);

if (DISK_BAD(this->disk)) {
Dbg(dbg_ctl_cache_dir_sync, "Dir %s: ignoring -- bad disk", this->hash_text.get());
Expand Down
6 changes: 6 additions & 0 deletions src/traffic_server/traffic_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ extern "C" int plock(int);
#include "../iocore/net/P_SSLUtils.h"
#include "../iocore/dns/P_SplitDNSProcessor.h"
#include "../iocore/hostdb/P_HostDB.h"
#include "../iocore/cache/P_CacheDir.h"
#include "../records/P_RecCore.h"
#include "tscore/Layout.h"
#include "iocore/utils/Machine.h"
Expand Down Expand Up @@ -287,6 +288,11 @@ struct AutoStopCont : public Continuation {
jsonrpcServer->stop_thread();
}

// Flush the in-memory cache directory to disk
if (cacheProcessor.IsCacheEnabled() == CacheInitState::INITIALIZED) {
sync_cache_dir_on_shutdown();
}

Comment thread
masaori335 marked this conversation as resolved.
// Push buffered log entries into the preproc queue before shutdown.
Log::flush_all_objects();

Expand Down