Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: decrease pinmgr threads and add last cont id #954

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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