Skip to content

Commit

Permalink
Merge pull request #954 from application-research/cont-id-fix
Browse files Browse the repository at this point in the history
fix: decrease pinmgr threads and add last cont id
  • Loading branch information
alvin-reyes authored Mar 15, 2023
2 parents 4f74e82 + f9f8eba commit 66a41e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/estuary-shuttle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ func main() {
MaxActivePerUser: 30,
QueueDataDir: cfg.DataDir,
}, log)
go s.PinMgr.Run(300)
go s.PinMgr.Run(10)

// only refresh pin queue if pin queue refresh and local adding are enabled
if !cfg.NoReloadPinQueue && !cfg.Content.DisableLocalAdding {
Expand Down
2 changes: 1 addition & 1 deletion deal/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (m *manager) runDealBackFillWorker(ctx context.Context) {
m.log.Debugf("trying to start deal queue backfill, starting from content: %d", tracker.LastContID)

var contents []*util.Content
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 {
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 {
m.log.Warnf("failed to get contents for deal queue backfill - %s", err)
continue
}
Expand Down

0 comments on commit 66a41e8

Please sign in to comment.