diff --git a/packages/node-core/src/indexer/store.service.ts b/packages/node-core/src/indexer/store.service.ts index 1a47b180e4..bf83cff5fc 100644 --- a/packages/node-core/src/indexer/store.service.ts +++ b/packages/node-core/src/indexer/store.service.ts @@ -560,6 +560,7 @@ group by const record = await model.findOne({ where: {id}, transaction: this.tx, + lock: true, }); return record?.toJSON() as T; } catch (e) { @@ -589,6 +590,7 @@ group by transaction: this.tx, limit: options?.limit ?? this.config.queryLimit, offset: options?.offset, + lock: true, }); return records.map((record) => record.toJSON() as T); } catch (e) { @@ -614,6 +616,7 @@ group by const record = await model.findOne({ where: {[field]: value}, transaction: this.tx, + lock: true, }); return record?.toJSON() as T; } catch (e) {