chore(db): buffer pulled files for smaller WAL (#10036)

We can't hold a long select open while pulling.
This commit is contained in:
Jakob Borg
2025-04-04 08:15:59 +02:00
committed by GitHub
parent bae976905c
commit fa3b9acca3
3 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -295,7 +295,7 @@ func (s *indexHandler) sendIndexTo(ctx context.Context) error {
var f protocol.FileInfo
previousWasDelete := false
for fi, err := range itererr.Zip(s.sdb.AllLocalFilesBySequence(s.folder, protocol.LocalDeviceID, s.localPrevSequence+1, 5000)) {
for fi, err := range itererr.Zip(s.sdb.AllLocalFilesBySequence(s.folder, protocol.LocalDeviceID, s.localPrevSequence+1, MaxBatchSizeFiles+1)) {
if err != nil {
return err
}