Skip to content

Commit

Permalink
#1870 check opened dbs
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Oct 7, 2024
1 parent 1f47de9 commit 1f4e7ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libbatched-io/BatchedRotatingHistoricDbIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ void BatchedRotatingHistoricDbIO::rotate( uint64_t timestamp ) {
void BatchedRotatingHistoricDbIO::checkOpenedDbsAndCloseIfNeeded() {
std::lock_guard< std::mutex > lock( mutex );

if ( ( lastCleanup + std::chrono::seconds( 1000 ) > std::chrono::system_clock::now() ) &&
dbsInUse.size() < 10 )
if ( ( lastCleanup + OPENED_DB_CHECK_INTERVAL > std::chrono::system_clock::now() ) &&
dbsInUse.size() < MAX_OPENED_DB_COUNT )
return;

for ( auto it = dbsInUse.begin(); it != dbsInUse.end(); ) {
Expand Down

0 comments on commit 1f4e7ca

Please sign in to comment.