Skip to content

Commit 66a41e8

Browse files
authored
Merge pull request #954 from application-research/cont-id-fix
fix: decrease pinmgr threads and add last cont id
2 parents 4f74e82 + f9f8eba commit 66a41e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/estuary-shuttle/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ func main() {
557557
MaxActivePerUser: 30,
558558
QueueDataDir: cfg.DataDir,
559559
}, log)
560-
go s.PinMgr.Run(300)
560+
go s.PinMgr.Run(10)
561561

562562
// only refresh pin queue if pin queue refresh and local adding are enabled
563563
if !cfg.NoReloadPinQueue && !cfg.Content.DisableLocalAdding {

deal/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (m *manager) runDealBackFillWorker(ctx context.Context) {
5555
m.log.Debugf("trying to start deal queue backfill, starting from content: %d", tracker.LastContID)
5656

5757
var contents []*util.Content
58-
if err := m.db.Where("size >= ? and size <= ? and active", m.cfg.Content.MinSize, m.cfg.Content.MaxSize).Order("id asc").Limit(2000).Find(&contents).Error; err != nil {
58+
if err := m.db.Where("size >= ? and size <= ? and active and id > ?", m.cfg.Content.MinSize, m.cfg.Content.MaxSize, tracker.LastContID).Order("id asc").Limit(2000).Find(&contents).Error; err != nil {
5959
m.log.Warnf("failed to get contents for deal queue backfill - %s", err)
6060
continue
6161
}

0 commit comments

Comments
 (0)