Skip to content

Commit 0aa701d

Browse files
authored
Merge pull request #922 from evoskuil/master
Log store dirty/clean state at startup, comments.
2 parents 1b4b567 + 685e2a5 commit 0aa701d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

console/executor_store.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ code executor::open_store_coded(bool details)
116116
return ec;
117117
}
118118

119-
logger(BN_DATABASE_STARTED);
119+
logger(store_.is_dirty() ? BN_DATABASE_STARTED_DIRTY : BN_DATABASE_STARTED);
120120
return error::success;
121121
}
122122

console/localize.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ namespace node {
171171
#define BN_NODE_INTERRUPT \
172172
"Press CTRL-C to stop the node."
173173
#define BN_DATABASE_STARTED \
174-
"Database is started."
174+
"Database is started (clean)."
175+
#define BN_DATABASE_STARTED_DIRTY \
176+
"Database is started (dirty)."
175177
#define BN_NETWORK_STARTING \
176178
"Please wait while network is starting..."
177179
#define BN_NODE_START_FAIL \

src/full_node.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,10 @@ code full_node::reload(const store::event_handler& handler) NOEXCEPT
432432

433433
const auto start = logger::now();
434434
suspend(error::store_reload);
435+
436+
// This will set the store's dirty flag causing increased read activity for
437+
// set(tx/block) due to activation of duplicate detection. The store is
438+
// is however always in a dirty state after startup with non-empty tables.
435439
const auto ec = query_.reload([&](auto event, auto table) NOEXCEPT
436440
{
437441
// Suspend channels that missed previous suspend events.

0 commit comments

Comments
 (0)