Skip to content

Commit

Permalink
Extra logging for bucket removal and merge
Browse files Browse the repository at this point in the history
  • Loading branch information
marta-lokhova committed Aug 24, 2018
1 parent 45729b0 commit cf765d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/bucket/Bucket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "main/Application.h"
#include "medida/medida.h"
#include "util/Fs.h"
#include "util/LogSlowExecution.h"
#include "util/Logging.h"
#include "util/TmpDir.h"
#include "util/XDRStream.h"
Expand Down Expand Up @@ -151,7 +152,13 @@ Bucket::fresh(BucketManager& bucketManager,

auto liveBucket = liveOut.getBucket(bucketManager);
auto deadBucket = deadOut.getBucket(bucketManager);
return Bucket::merge(bucketManager, liveBucket, deadBucket);

std::shared_ptr<Bucket> bucket;
{
auto timer = LogSlowExecution("Bucket merge");
bucket = Bucket::merge(bucketManager, liveBucket, deadBucket);
}
return bucket;
}

inline void
Expand Down
6 changes: 5 additions & 1 deletion src/bucket/BucketManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "main/Config.h"
#include "overlay/StellarXDR.h"
#include "util/Fs.h"
#include "util/LogSlowExecution.h"
#include "util/Logging.h"
#include "util/TmpDir.h"
#include "util/types.h"
Expand Down Expand Up @@ -171,7 +172,10 @@ BucketManagerImpl::adoptFileAsBucket(std::string const& filename,
{
CLOG(DEBUG, "Bucket") << "Deleting bucket file " << filename
<< " that is redundant with existing bucket";
std::remove(filename.c_str());
{
auto timer = LogSlowExecution("Delete redundant bucket");
std::remove(filename.c_str());
}
}
else
{
Expand Down

9 comments on commit cf765d9

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from MonsieurNicolas
at marta-lokhova@cf765d9

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging marta-lokhova/stellar-core/extra_logging = cf765d9 into auto

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marta-lokhova/stellar-core/extra_logging = cf765d9 merged ok, testing candidate = 5197d65a

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from MonsieurNicolas
at marta-lokhova@cf765d9

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging marta-lokhova/stellar-core/extra_logging = cf765d9 into auto

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marta-lokhova/stellar-core/extra_logging = cf765d9 merged ok, testing candidate = 81446c6

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 81446c6

Please sign in to comment.