Skip to content

Commit

Permalink
Change pvtdata store purger log level to debug
Browse files Browse the repository at this point in the history
FAB-10871 #done

Change-Id: Ibe3ba4eded13f06d10a36e44775daad3b8655aaa
Signed-off-by: manish <manish.sethi@gmail.com>
  • Loading branch information
manish-sethi authored and mastersingh24 committed Sep 27, 2018
1 parent 0af8894 commit 620392c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/ledger/pvtdatastorage/store_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,21 +257,21 @@ func (s *store) performPurgeIfScheduled(latestCommittedBlk uint64) {
}
go func() {
s.purgerLock.Lock()
logger.Infof("Purger started: Purging expired private data till block number [%d]", latestCommittedBlk)
logger.Debugf("Purger started: Purging expired private data till block number [%d]", latestCommittedBlk)
defer s.purgerLock.Unlock()
err := s.purgeExpiredData(0, latestCommittedBlk)
if err != nil {
logger.Warningf("Could not purge data from pvtdata store:%s", err)
}
logger.Info("Purger finished")
logger.Debug("Purger finished")
}()
}

func (s *store) purgeExpiredData(minBlkNum, maxBlkNum uint64) error {
batch := leveldbhelper.NewUpdateBatch()
expiryEntries, err := s.retrieveExpiryEntries(minBlkNum, maxBlkNum)
if err != nil {
return nil
if err != nil || len(expiryEntries) == 0 {
return err
}
for _, expiryEntry := range expiryEntries {
// this encoding could have been saved if the function retrieveExpiryEntries also returns the encoded expiry keys.
Expand All @@ -282,7 +282,7 @@ func (s *store) purgeExpiredData(minBlkNum, maxBlkNum uint64) error {
}
s.db.WriteBatch(batch, false)
}
logger.Debugf("[%d] Entries purged from private data storage", len(expiryEntries))
logger.Infof("[%s] - [%d] Entries purged from private data storage till block number [%d]", s.ledgerid, len(expiryEntries), maxBlkNum)
return nil
}

Expand Down

0 comments on commit 620392c

Please sign in to comment.