Skip to content

Commit

Permalink
v3rpc: update mvcc db size stats after defrag
Browse files Browse the repository at this point in the history
  • Loading branch information
heyitsanthony committed Jun 21, 2017
1 parent a40cdc7 commit b7e8ad6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions etcdserver/api/v3rpc/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ func (ms *maintenanceServer) Defragment(ctx context.Context, sr *pb.DefragmentRe
plog.Errorf("failed to defragment the storage backend (%v)", err)
return nil, err
}

// force a write transaction to update the mvcc db size metrics
ms.kg.KV().Write().End()

plog.Noticef("finished defragmenting the storage backend")
return &pb.DefragmentResponse{}, nil
}
Expand Down

0 comments on commit b7e8ad6

Please sign in to comment.