Skip to content

Commit

Permalink
update (stellar#5097)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsachiherman authored and tamirms committed Dec 11, 2023
1 parent a4a7a61 commit 558003c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ingest/checkpoint_change_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,19 @@ func (r *CheckpointChangeReader) streamBucketContents(hash historyarchive.Hash,
var batch []xdr.BucketEntry
lastBatch := false

preloadKeys := make([]string, 0, preloadedEntries)

LoopBucketEntry:
for {
// Preload entries for faster retrieve from temp store.
if len(batch) == 0 {
if lastBatch {
return true
}
batch = make([]xdr.BucketEntry, 0, preloadedEntries)

preloadKeys := []string{}
// reset the content of the preloadKeys
preloadKeys = preloadKeys[:0]

for i := 0; i < preloadedEntries; i++ {
var entry xdr.BucketEntry
Expand Down

0 comments on commit 558003c

Please sign in to comment.