mirror of
https://github.com/Xahau/xahaud.git
synced 2026-04-29 15:37:46 +00:00
remove excess print statements and change spinlock to 100ns
This commit is contained in:
@@ -119,7 +119,7 @@ SHAMapStoreImp::SHAMapStoreImp(
|
||||
get_if_exists(section, "online_delete", deleteInterval_);
|
||||
|
||||
bool const isMem = config.mem_backend();
|
||||
|
||||
|
||||
if (deleteInterval_ || isMem)
|
||||
{
|
||||
if (app_.config().reporting())
|
||||
@@ -130,7 +130,7 @@ SHAMapStoreImp::SHAMapStoreImp(
|
||||
}
|
||||
|
||||
if (isMem)
|
||||
deleteInterval_ = config.LEDGER_HISTORY;
|
||||
deleteInterval_ = config.LEDGER_HISTORY;
|
||||
|
||||
// Configuration that affects the behavior of online delete
|
||||
get_if_exists(section, "delete_batch", deleteBatch_);
|
||||
@@ -201,7 +201,7 @@ SHAMapStoreImp::makeNodeStore(int readThreads)
|
||||
"online_delete info from config");
|
||||
}
|
||||
SavedState state = state_db_.getState();
|
||||
|
||||
|
||||
auto writableBackend = makeBackendRotating(state.writableDb);
|
||||
auto archiveBackend = makeBackendRotating(state.archiveDb);
|
||||
if (!state.writableDb.size())
|
||||
@@ -302,12 +302,9 @@ SHAMapStoreImp::run()
|
||||
|
||||
bool const isMem = app_.config().mem_backend();
|
||||
|
||||
std::cout << "SHAMapStoreImp: isMem = " << (isMem ? "true" : "false") << "\n";
|
||||
|
||||
std::cout << "SHAMapStoreImp: lastRotated = " << lastRotated << "\n";
|
||||
if (advisoryDelete_)
|
||||
canDelete_ = state_db_.getCanDelete();
|
||||
|
||||
|
||||
while (true)
|
||||
{
|
||||
healthy_ = true;
|
||||
@@ -398,7 +395,7 @@ SHAMapStoreImp::run()
|
||||
return;
|
||||
// Only log if we completed without a "health" abort
|
||||
JLOG(journal_.warn()) << "copied ledger " << validatedSeq
|
||||
<< " nodecount " << nodeCount;
|
||||
<< " nodecount " << nodeCount;
|
||||
|
||||
JLOG(journal_.warn()) << "freshening caches";
|
||||
freshenCaches();
|
||||
|
||||
@@ -96,7 +96,6 @@ public:
|
||||
table_.clear();
|
||||
#endif
|
||||
isOpen_ = false;
|
||||
std::cout << "memdb " << name_ << " is closed.\n";
|
||||
}
|
||||
|
||||
Status
|
||||
@@ -162,10 +161,7 @@ public:
|
||||
return;
|
||||
|
||||
if (!object)
|
||||
{
|
||||
std::cout << "mapping null object\n";
|
||||
return;
|
||||
}
|
||||
|
||||
EncodedBlob encoded(object);
|
||||
nudb::detail::buffer bf;
|
||||
|
||||
@@ -44,11 +44,7 @@ public:
|
||||
{
|
||||
entries.clear();
|
||||
for (auto const& entry : v)
|
||||
{
|
||||
entries.emplace(entry.endpoint, entry.valence);
|
||||
}
|
||||
|
||||
std::cout << "peer finder mem map size: " << entries.size() << "\n";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ SHAMap::fetchNodeNT(SHAMapHash const& hash, SHAMapSyncFilter* filter) const
|
||||
{
|
||||
using namespace std::chrono;
|
||||
auto start = high_resolution_clock::now();
|
||||
auto timeout = nanoseconds(600);
|
||||
auto timeout = nanoseconds(50);
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user