Skip to content

Commit c0f41b7

Browse files
committed
(NOBIDS) Add comment to ClearByPrefix
1 parent f229e53 commit c0f41b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

db/bigtable_common.go

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func (bigtable *Bigtable) ClearByPrefix(table string, family, prefix string, dry
132132
keysCount++
133133
}
134134

135+
// we still need to commit in batches here (instead of just calling WriteBulk only once) as loading all keys to be deleted in memory first is not feasible as the delete function could be used to delete millions of rows
135136
if mutsDelete.Len() == MAX_BATCH_MUTATIONS {
136137
logrus.Infof("deleting %v keys (first key %v, last key %v)", len(mutsDelete.Keys), mutsDelete.Keys[0], mutsDelete.Keys[len(mutsDelete.Keys)-1])
137138
if !dryRun {

0 commit comments

Comments
 (0)