执行checkpoint,trigger是commit再执行independentCheckPoint

This commit is contained in:
wkj 2024-12-26 13:53:50 +08:00
parent 1b925944a8
commit 10c30b83f4
2 changed files with 8 additions and 2 deletions

View File

@ -486,7 +486,10 @@ class TriggerExecutor {
async checkpoint(timestamp) {
let result = 0;
for (const name in this.triggerNameMap) {
result += await this.independentCheckPoint(name, timestamp);
const trigger = this.triggerNameMap[name];
if (trigger && trigger.when === 'commit') {
result += await this.independentCheckPoint(name, timestamp);
}
}
return result;
}

View File

@ -598,7 +598,10 @@ export class TriggerExecutor<ED extends EntityDict & BaseEntityDict, Cxt extends
async checkpoint(timestamp: number): Promise<number> {
let result = 0;
for (const name in this.triggerNameMap) {
result += await this.independentCheckPoint(name,timestamp);
const trigger = this.triggerNameMap[name];
if (trigger && trigger.when === 'commit') {
result += await this.independentCheckPoint(name, timestamp);
}
}
return result;
}