Skip to content

feat: add source/destination/e2e commit lag metrics#4573

Merged
dtunikov merged 21 commits into
mainfrom
feat/commit-lag-metric-improvements
Jul 21, 2026
Merged

feat: add source/destination/e2e commit lag metrics#4573
dtunikov merged 21 commits into
mainfrom
feat/commit-lag-metric-improvements

Conversation

@dtunikov

@dtunikov dtunikov commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This PR adds new source/destination/e2e commit lag metrics.

  • source - lag between commit ts and ts of receiving an event on peerdb side. Recorded from connectors' code directly.
  • destination - lag between receiving an event on peerdb side and writing to ch. Recorded from normalize batches shared activity code.
  • e2e - roughly the sum of the two above. Recorded from normalize batches shared activity code.

Migration for cdc_batches table was added, it adds two new fields - first_row_received_at and first_row_commit_time. These fields allow us to report destination and e2e lag metrics.

- take clock skew into account for all source connectors
Comment thread flow/connectors/postgres/cdc.go Outdated
Comment thread flow/connectors/mongo/cdc.go
Comment thread flow/connectors/postgres/cdc.go Outdated
Comment on lines +786 to +789
// A keepalive means there is currently no source change event to lag behind.
// Reset the gauge so a previously backlogged, now-idle pipe does not retain
// the old source-lag value.
p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PG does reset the timeout countdown on data events, but when it's decoding a large tx or reading a large row from a throttled volume, it can still send these in between. When the source is backed up like this, this metric would be important in surfacing it. Debezium doesn't seem to be doing resets for PG at all, so maybe that's defensible, and I also wasn't able to find a solid one.

@dtunikov dtunikov Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, but just removing this reset would lead to alerts in these cases: "previously backlogged, now-idle pipe".
wdyt about this approach?

	if totalRecords == 0 && int64(clientXLogPos) > req.ConsumedOffset.Load() {
		err := p.updateConsumedOffset(ctx, logger, req.FlowJobName, req.ConsumedOffset, clientXLogPos)
		if err != nil {
			return err
		}
		lastEmptyBatchPkmSentTime = time.Now()
		// Caught up with no records for this flow: clear any stale source lag.
		p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)
	}

totalRecords == 0 && clientXLogPos > ConsumedOffset means precisely "this whole batch produced no records for our publication, yet our position advanced" — i.e. our pipe is idle-but-progressing.
and another defensive reset on the keep alive path:

if pkm.ServerWALEnd <= clientXLogPos {
  p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)
}

this handles a case when we're fully caught up with ServerWALEnd. This complements previous check for the cases when ALL tables are idle.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to think a bit more, brain fried atm

@ilidemi ilidemi Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if pkm.ServerWALEnd <= clientXLogPos {
  p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)
}

May be a bit confusing but ServerWALEnd is not WAL head but the current decoder position. It doesn't mean we've caught up
https://github.com/postgres/postgres/blob/8ac700acffc7b17d88414be47b8dff44fb1ea681/src/backend/replication/walsender.c#L3607-L3609

	if totalRecords == 0 && int64(clientXLogPos) > req.ConsumedOffset.Load() {
		err := p.updateConsumedOffset(ctx, logger, req.FlowJobName, req.ConsumedOffset, clientXLogPos)
		if err != nil {
			return err
		}
		lastEmptyBatchPkmSentTime = time.Now()
		// Caught up with no records for this flow: clear any stale source lag.
		p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)
	}

totalRecords == 0 can happen when PG is terribly terribly slow decoding a large transaction event (low on logical_decoding_work_mem, overloaded CPU, out of EBS iops budget and the event is 1GB). It is possible that we receive a primary keepalive advancing the XLogPos with some events outside of the publication before that, or receive a random row outside of our tables, the large tx data would still be pending and possibly stale in this case.

For this PR let's remove the zeroing out PG part + requestReply to unblock the rest of the work. If we find some creative and working solution later on, it can be PR'd separately.

Comment thread flow/connectors/mysql/cdc.go Outdated
Comment thread flow/otel_metrics/otel_manager.go Outdated
Comment thread flow/connectors/postgres/cdc.go
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

❌ 8 Tests Failed:

Tests completed Failed Passed Skipped
3040 8 3032 377
View the top 3 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH
Stack Traces | 0.01s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
Stack Traces | 0.01s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMySQL_CH
Stack Traces | 0.01s run time
=== RUN   TestPeerFlowE2ETestSuiteMySQL_CH
=== PAUSE TestPeerFlowE2ETestSuiteMySQL_CH
=== CONT  TestPeerFlowE2ETestSuiteMySQL_CH
--- FAIL: TestPeerFlowE2ETestSuiteMySQL_CH (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
Stack Traces | 0.01s run time
=== RUN   TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
=== PAUSE TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
=== CONT  TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
--- FAIL: TestPeerFlowE2ETestSuiteMySQL_CH_Cluster (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_DateTime_ClickHouse_Range
Stack Traces | 20.1s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_DateTime_ClickHouse_Range
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_DateTime_ClickHouse_Range
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_DateTime_ClickHouse_Range
2026/07/20 13:44:26 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/20 13:44:26 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/20 13:44:26 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychclg_2z3aiio4.test_simple_schema_changes
    clickhouse_mysql_test.go:2139: WaitFor waiting on snapshot 2026-07-20 13:44:30.325359017 +0000 UTC m=+510.934182382
    clickhouse_mysql_test.go:2143: WaitFor waiting on cdc 2026-07-20 13:44:30.329656522 +0000 UTC m=+510.938479897
    clickhouse_mysql_test.go:2160: 
        	Error Trace:	.../flow/e2e/clickhouse_mysql_test.go:2160
        	            				.../flow/e2e/clickhouse_mysql_test.go:2166
        	            				.../hostedtoolcache/go/1.26.5.../src/runtime/asm_amd64.s:1771
        	Error:      	Not equal: 
        	            	expected: "1900-01-01"
        	            	actual  : "1000-06-15"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-1900-01-01
        	            	+1000-06-15
        	Test:       	TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_DateTime_ClickHouse_Range
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_DateTime_ClickHouse_Range (20.12s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMySQL_CH/Test_MySQL_DateTime_ClickHouse_Range
Stack Traces | 20.1s run time
=== RUN   TestPeerFlowE2ETestSuiteMySQL_CH/Test_MySQL_DateTime_ClickHouse_Range
=== PAUSE TestPeerFlowE2ETestSuiteMySQL_CH/Test_MySQL_DateTime_ClickHouse_Range
=== CONT  TestPeerFlowE2ETestSuiteMySQL_CH/Test_MySQL_DateTime_ClickHouse_Range
2026/07/20 13:45:15 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mych_zy5toolj.test_skip_snapshot
2026/07/20 13:45:15 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
    clickhouse_mysql_test.go:2139: WaitFor waiting on snapshot 2026-07-20 13:45:19.44358156 +0000 UTC m=+560.052404935
    clickhouse_mysql_test.go:2143: WaitFor waiting on cdc 2026-07-20 13:45:19.447634809 +0000 UTC m=+560.056458174
2026/07/20 13:45:19 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mych_hkdkekvn.test_time
    clickhouse_mysql_test.go:2160: 
        	Error Trace:	.../flow/e2e/clickhouse_mysql_test.go:2160
        	            				.../flow/e2e/clickhouse_mysql_test.go:2166
        	            				.../hostedtoolcache/go/1.26.5.../src/runtime/asm_amd64.s:1771
        	Error:      	Not equal: 
        	            	expected: "1900-01-01"
        	            	actual  : "1000-06-15"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-1900-01-01
        	            	+1000-06-15
        	Test:       	TestPeerFlowE2ETestSuiteMySQL_CH/Test_MySQL_DateTime_ClickHouse_Range
--- FAIL: TestPeerFlowE2ETestSuiteMySQL_CH/Test_MySQL_DateTime_ClickHouse_Range (20.13s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
Stack Traces | 20.2s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
2026/07/20 13:50:00 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/20 13:50:00 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/20 13:50:00 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_machcl_tnqujtqw.test_ghost_add_col_types
    clickhouse_mysql_test.go:2139: WaitFor waiting on snapshot 2026-07-20 13:50:05.164909578 +0000 UTC m=+845.773732943
    clickhouse_mysql_test.go:2143: WaitFor waiting on cdc 2026-07-20 13:50:05.171929964 +0000 UTC m=+845.780753339
2026/07/20 13:50:05 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_machcl_tnqujtqw.test_ghost_add_col_types
    clickhouse_mysql_test.go:2160: 
        	Error Trace:	.../flow/e2e/clickhouse_mysql_test.go:2160
        	            				.../flow/e2e/clickhouse_mysql_test.go:2166
        	            				.../hostedtoolcache/go/1.26.5.../src/runtime/asm_amd64.s:1771
        	Error:      	Not equal: 
        	            	expected: "1900-01-01"
        	            	actual  : "1000-06-15"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-1900-01-01
        	            	+1000-06-15
        	Test:       	TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range (20.24s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
Stack Traces | 20.2s run time
=== RUN   TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
=== PAUSE TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
=== CONT  TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
2026/07/20 13:48:59 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/20 13:48:59 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_x4kgpoxw.test_extra_ch_cols
2026/07/20 13:48:59 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
    clickhouse_mysql_test.go:2139: WaitFor waiting on snapshot 2026-07-20 13:49:04.195558468 +0000 UTC m=+784.804381833
    clickhouse_mysql_test.go:2143: WaitFor waiting on cdc 2026-07-20 13:49:04.20138718 +0000 UTC m=+784.810210555
2026/07/20 13:49:04 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_vt6wgs1i.test_composite_pkey_ordering
    clickhouse_mysql_test.go:2160: 
        	Error Trace:	.../flow/e2e/clickhouse_mysql_test.go:2160
        	            				.../flow/e2e/clickhouse_mysql_test.go:2166
        	            				.../hostedtoolcache/go/1.26.5.../src/runtime/asm_amd64.s:1771
        	Error:      	Not equal: 
        	            	expected: "1900-01-01"
        	            	actual  : "1000-06-15"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-1900-01-01
        	            	+1000-06-15
        	Test:       	TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range
--- FAIL: TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_DateTime_ClickHouse_Range (20.24s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: The mongo connector test package fails to compile because cdc_test.go:391 calls createPipeline with too few arguments (a signature mismatch), which is a deterministic build error, not a flaky test.
Confidence: 0.99

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: This is a deterministic build failure — the mongo connector test fails to compile because a createPipeline call at cdc_test.go:391 has too few arguments, not a flaky test.
Confidence: 0.99

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: This is a deterministic Go build failure — cdc_test.go:391 calls createPipeline with too few arguments, so the mongo connector test package fails to compile, which is a real code bug rather than a flaky test.
Confidence: 0.99

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Not flaky — a deterministic build failure: cdc_test.go:391 calls createPipeline with too few arguments, breaking compilation of the mongo connector test package.
Confidence: 0.99

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: A deterministic build failure — cdc_test.go:391 calls createPipeline with too few arguments — not a flaky test.
Confidence: 0.99

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@dtunikov dtunikov changed the title feat: commig lag metric improvements feat: add source/destination/e2e commit lag metrics Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: A single isolated mongo-8.0-only failure where MongoDB reported oplog retention as 23h despite CI explicitly configuring --oplogMinRetentionHours 24, while the same test passed on the 6.0/7.0 jobs and the PR (commit-lag metrics) doesn't touch mongo validation — an environmental/startup timing flake, not a real bug.
Confidence: 0.82

✅ Automatically retrying the workflow

View workflow run

dtunikov and others added 2 commits July 17, 2026 16:32
Group time.Time fields before the string/slice so the GC pointer-scan
region ends at the slice (88 bytes) instead of inside a time.Time (104).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
format!(
"cannot write value {:?} in postgres protocol: unimplemented",
&value
value

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clippy failed on this one, i guess should be fixed on the main branch

@dtunikov
dtunikov marked this pull request as ready for review July 17, 2026 16:40
@dtunikov
dtunikov requested a review from a team as a code owner July 17, 2026 16:40
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@ilidemi ilidemi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great. The only piece left is thinking through Postgres carefully

Comment thread flow/connectors/mongo/mongo.go Outdated
Comment thread flow/connectors/postgres/cdc.go Outdated
Comment on lines +786 to +789
// A keepalive means there is currently no source change event to lag behind.
// Reset the gauge so a previously backlogged, now-idle pipe does not retain
// the old source-lag value.
p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to think a bit more, brain fried atm

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Real bug: Test_MySQL_DateTime_ClickHouse_Range failed deterministically in all four suite variants with an identical value mismatch (expected clamped "1900-01-01", got unclamped "1000-06-15"), showing out-of-range MySQL dates are not being clamped to ClickHouse's boundary — with no timeout, race, or network signatures.
Confidence: 0.92

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Test_MySQL_DateTime_ClickHouse_Range fails deterministically across all four ClickHouse suites with an identical date value mismatch (expected "1900-01-01", got "1000-06-15"), indicating a real MySQL→ClickHouse datetime range-clamping bug rather than a flaky failure.
Confidence: 0.96

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Not flaky — Test_MySQL_DateTime_ClickHouse_Range fails deterministically in all 8 suite variants with an identical assertion mismatch (expected "1900-01-01", got "1000-06-15"), only on the ClickHouse "latest" job, indicating a real date-range handling change/bug rather than an intermittent failure.
Confidence: 0.9

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

Comment thread .github/workflows/dev-docker.yml Outdated
Comment thread flow/connectors/postgres/cdc.go Outdated
Comment on lines +786 to +789
// A keepalive means there is currently no source change event to lag behind.
// Reset the gauge so a previously backlogged, now-idle pipe does not retain
// the old source-lag value.
p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)

@ilidemi ilidemi Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if pkm.ServerWALEnd <= clientXLogPos {
  p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)
}

May be a bit confusing but ServerWALEnd is not WAL head but the current decoder position. It doesn't mean we've caught up
https://github.com/postgres/postgres/blob/8ac700acffc7b17d88414be47b8dff44fb1ea681/src/backend/replication/walsender.c#L3607-L3609

	if totalRecords == 0 && int64(clientXLogPos) > req.ConsumedOffset.Load() {
		err := p.updateConsumedOffset(ctx, logger, req.FlowJobName, req.ConsumedOffset, clientXLogPos)
		if err != nil {
			return err
		}
		lastEmptyBatchPkmSentTime = time.Now()
		// Caught up with no records for this flow: clear any stale source lag.
		p.otelManager.Metrics.CommitLagGauge.Record(ctx, 0)
	}

totalRecords == 0 can happen when PG is terribly terribly slow decoding a large transaction event (low on logical_decoding_work_mem, overloaded CPU, out of EBS iops budget and the event is 1GB). It is possible that we receive a primary keepalive advancing the XLogPos with some events outside of the publication before that, or receive a random row outside of our tables, the large tx data would still be pending and possibly stale in this case.

For this PR let's remove the zeroing out PG part + requestReply to unblock the rest of the work. If we find some creative and working solution later on, it can be PR'd separately.

@dtunikov
dtunikov merged commit c9577a6 into main Jul 21, 2026
24 checks passed
@dtunikov
dtunikov deleted the feat/commit-lag-metric-improvements branch July 21, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants