Ticket #912 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Nightly scheduler fails to trigger if too many pending changes

Reported by: GillesGagniard Owned by:
Priority: critical Milestone: 0.8.2
Version: 0.8.0 Keywords: database
Cc:

Description

buildbot issues the following sqlite query to remove pending changes when triggering a Nightly scheduler in buildbot/db/connector.py :

def scheduler_retire_changes(self, schedulerid, changeids, t):
  t.execute(self.quoteq("DELETE FROM scheduler_changes"
                        " WHERE schedulerid=? AND changeid IN ")
  + self.parmlist(len(changeids)),
  (schedulerid,) + tuple(changeids))

However, sqlite only allows for 999 variables in a sql query, so this fails if there are more than 999 pending changes.

Change History

comment:1 Changed 3 years ago by dustin

  • Keywords database added
  • Priority changed from major to critical
  • Milestone changed from undecided to 0.8.2

So putting that in a loop wiht some (probably smaller) limit on the number of variables used in a single query would be OK?

comment:2 Changed 3 years ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

retire changes in batches

SQLite, at least, has a limit on the number of parameters it can accept. Fixes #912.

Changeset: 13544de519394969839e1efc927cfa1c0866dd6d

Note: See TracTickets for help on using tickets.