Skip to content

Commit

Permalink
Revert the end of scavenge log line to the same content as before.
Browse files Browse the repository at this point in the history
  • Loading branch information
lscpike committed Nov 26, 2018
1 parent 2099c05 commit 3e7f3ba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Expand Up @@ -8,6 +8,8 @@ public class FakeTFScavengerLog : ITFChunkScavengerLog
{
public string ScavengeId { get; } = "FakeScavenge";

public long SpaceSaved { get; } = 0;

public bool Started { get; private set; }

public bool Completed { get; private set; }
Expand Down
Expand Up @@ -6,7 +6,9 @@ namespace EventStore.Core.TransactionLog.Chunks
public interface ITFChunkScavengerLog : IIndexScavengerLog
{
string ScavengeId { get; }


long SpaceSaved { get; }

void ScavengeStarted();

void ChunksScavenged(int chunkStartNumber, int chunkEndNumber, TimeSpan elapsed, long spaceSaved);
Expand Down
Expand Up @@ -201,7 +201,7 @@ private void ScavengeInternal(bool alwaysKeepScavenged, bool mergeChunks, int st
} while (mergedSomething);
}

Log.Trace("SCAVENGING: total time taken: {0}.", totalSw.Elapsed);
Log.Trace("SCAVENGING: total time taken: {0}, total space saved: {1}.", totalSw.Elapsed, _scavengerLog.SpaceSaved);
}

private void ScavengeChunk(bool alwaysKeepScavenged, TFChunk.TFChunk oldChunk, ThreadLocalScavengeCache threadLocalCache, CancellationToken ct)
Expand Down
Expand Up @@ -36,6 +36,8 @@ public TFChunkScavengerLog(IODispatcher ioDispatcher, string scavengeId, string

public string ScavengeId => _scavengeId;

public long SpaceSaved => Interlocked.Read(ref _spaceSaved);

public void ScavengeStarted()
{
var metadataEventId = Guid.NewGuid();
Expand Down

0 comments on commit 3e7f3ba

Please sign in to comment.