Skip to content

Commit 5466599

Browse files
committed
A couple of suggested tweaks
1 parent beabd26 commit 5466599

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

apps/webapp/app/services/runsReplicationService.server.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,13 @@ export class RunsReplicationService {
385385
lastAcknowledgedAt: this._lastAcknowledgedAt,
386386
});
387387

388-
await this._replicationClient.acknowledge(this._latestCommitEndLsn);
388+
const [ackError] = await tryCatch(
389+
this._replicationClient.acknowledge(this._latestCommitEndLsn)
390+
);
391+
392+
if (ackError) {
393+
this.logger.error("Error acknowledging transaction", { ackError });
394+
}
389395

390396
if (this._isShutDownComplete && this._acknowledgeInterval) {
391397
clearInterval(this._acknowledgeInterval);

internal-packages/replication/src/pgoutput.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ class BinaryReader {
156156
readTime(): bigint {
157157
// (POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * USECS_PER_DAY == 946684800000000
158158
const microsSinceUnixEpoch = this.readUint64() + 946684800000000n;
159-
// Convert to milliseconds for JS Date compatibility
160159
return microsSinceUnixEpoch;
161160
}
162161
}

0 commit comments

Comments
 (0)