Robert and I talked through this for quite a while today.
CodeImportJobSet.getJobForMachine (lp.code.model.codeimportjob) is where the fun happens.
The heartbeat update is happening in
machine.shouldLookForJob(worker_limit)
After the heartbeat, the only things are comparing a local db field with an enum, and comparing two integers. Neither of these would trigger the flush (we think). The next thing that happens is the CodeImportJob.selectOne call, which does trigger the flush. It is between the flush which sets the heartbeat, and the execution of the select that we are losing a lot of time.
Robert and I talked through this for quite a while today.
CodeImportJobSe t.getJobForMach ine (lp.code. model.codeimpor tjob) is where the fun happens.
The heartbeat update is happening in shouldLookForJo b(worker_ limit)
machine.
After the heartbeat, the only things are comparing a local db field with an enum, and comparing two integers. Neither of these would trigger the flush (we think). The next thing that happens is the CodeImportJob. selectOne call, which does trigger the flush. It is between the flush which sets the heartbeat, and the execution of the select that we are losing a lot of time.