Merge pull request #33481 from walsm232/fix/catalog-refresh-state-deadlock
fix(catalog): Fix catalog refresh_state deadlock when running multiple replicas
This commit is contained in:
@@ -142,10 +142,13 @@ export class DefaultCatalogProcessingEngine {
|
||||
pollingIntervalMs: this.pollingIntervalMs,
|
||||
loadTasks: async count => {
|
||||
try {
|
||||
const { items } =
|
||||
await this.processingDatabase.getProcessableEntities(this.knex, {
|
||||
processBatchSize: count,
|
||||
});
|
||||
const { items } = await this.processingDatabase.transaction(
|
||||
async tx => {
|
||||
return this.processingDatabase.getProcessableEntities(tx, {
|
||||
processBatchSize: count,
|
||||
});
|
||||
},
|
||||
);
|
||||
return items;
|
||||
} catch (error) {
|
||||
this.logger.warn('Failed to load processing items', error);
|
||||
|
||||
Reference in New Issue
Block a user