From 5b73180f9bb7dd5b53b9c1fb13d7d763c3e670c8 Mon Sep 17 00:00:00 2001 From: ethanadams Date: Sat, 20 Jul 2019 06:39:14 -0400 Subject: [PATCH] Disable bandwidth rollups until duplicate data issue is resolved (#2606) * disable bandwidth rollups until duplicate data issue is resolved * disable rollup to make sure summaries still work correctly without the rollup --- storagenode/peer.go | 12 ++++++------ .../storagenodedb/storagenodedbtest/run_test.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/storagenode/peer.go b/storagenode/peer.go index a73f0aedd..49d7be6ad 100644 --- a/storagenode/peer.go +++ b/storagenode/peer.go @@ -354,9 +354,9 @@ func (peer *Peer) Run(ctx context.Context) (err error) { return errs2.IgnoreCanceled(peer.Vouchers.Run(ctx)) }) - group.Go(func() error { - return errs2.IgnoreCanceled(peer.DB.Bandwidth().Run(ctx)) - }) + //group.Go(func() error { + // return errs2.IgnoreCanceled(peer.DB.Bandwidth().Run(ctx)) + //}) group.Go(func() error { // TODO: move the message into Server instead @@ -387,9 +387,9 @@ func (peer *Peer) Close() error { // close services in reverse initialization order - if peer.DB.Bandwidth() != nil { - errlist.Add(peer.DB.Bandwidth().Close()) - } + //if peer.DB.Bandwidth() != nil { + // errlist.Add(peer.DB.Bandwidth().Close()) + //} if peer.Vouchers != nil { errlist.Add(peer.Vouchers.Close()) } diff --git a/storagenode/storagenodedb/storagenodedbtest/run_test.go b/storagenode/storagenodedb/storagenodedbtest/run_test.go index 1e98581bc..6648d4089 100644 --- a/storagenode/storagenodedb/storagenodedbtest/run_test.go +++ b/storagenode/storagenodedb/storagenodedbtest/run_test.go @@ -71,8 +71,8 @@ func TestBandwidthRollup(t *testing.T) { require.NoError(t, err) require.Equal(t, int64(27), usage.Total()) - err = db.Bandwidth().Rollup(ctx) - require.NoError(t, err) + //err = db.Bandwidth().Rollup(ctx) + //require.NoError(t, err) // After rollup, the totals should still be the same usage, err = db.Bandwidth().Summary(ctx, time.Now().Add(time.Hour*-48), time.Now())