Skip to content

Commit 5328367

Browse files
Merge pull request #188 from brownjuly2003-code/flink-configurable-backend
feat(flink): configurable state.backend (default rocksdb) + changelog for #184-186
2 parents a9164ed + e832307 commit 5328367

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@ All notable changes to AgentFlow are documented in this file.
44

55
## [Unreleased]
66

7+
### Added — Flink state backend is configurable (unblocks stand throughput runs)
8+
9+
- The Flink `state.backend.type` in `docker-compose.yml` is now
10+
`${FLINK_STATE_BACKEND:-rocksdb}` for both JobManager and TaskManager.
11+
Production and CI keep the RocksDB default (incremental checkpoints, off-heap
12+
state); a stand can export `FLINK_STATE_BACKEND=hashmap` to run the small
13+
dedup/TTL state in heap. Offered as a candidate workaround for a
14+
RocksDB-async-checkpoint native TaskManager crash observed on a constrained
15+
macOS/Lima Intel VM during a sustained-throughput window (root cause
16+
unconfirmed — may be the VM kernel, so this is a lever to try on the stand,
17+
not a proven fix). The default is unchanged, so CI `flink-smoke` keeps
18+
exercising RocksDB.
19+
20+
### Fixed — webhook dedup and cache-scan window (audit #184-186)
21+
22+
- **Webhook dispatcher** dropped a dead bare-`event_id` membership test — the
23+
seen-set only ever holds `tenant:event_id`, so dedup is strictly per-tenant
24+
(regression test added).
25+
- **Startup scan cursor** now seeds from the newest journal row whose
26+
`processed_at` parses, not blindly the newest row: a malformed newest
27+
timestamp left the cursor `None`, which made the first scan fetch from the
28+
oldest row and re-deliver the seeded batch.
29+
- **Metric-cache scan window** raised 200 → 2000 rows
30+
(`DEFAULT_SCAN_WINDOW_ROWS`). At the ≥100 eps target the pre-merge journal
31+
emits ~2 rows/event, so 200 left no margin for a non-pushing writer; push
32+
feeds still cover writers that publish.
33+
734
### Fixed — SSE per-connection dedup cache is bounded (issue #183 follow-up)
835

936
- **`/v1/stream/events` kept a bare per-connection seen-set** that grew one

‎docker-compose.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ services:
6767
jobmanager.rpc.address: flink-jobmanager
6868
jobmanager.bind-host: 0.0.0.0
6969
rest.bind-host: 0.0.0.0
70-
state.backend.type: rocksdb
70+
state.backend.type: ${FLINK_STATE_BACKEND:-rocksdb}
7171
execution.checkpointing.dir: s3://agentflow-lake/checkpoints
7272
s3.endpoint: http://minio:9000
7373
s3.access-key: minio
@@ -94,7 +94,7 @@ services:
9494
jobmanager.rpc.address: flink-jobmanager
9595
taskmanager.bind-host: 0.0.0.0
9696
taskmanager.numberOfTaskSlots: 4
97-
state.backend.type: rocksdb
97+
state.backend.type: ${FLINK_STATE_BACKEND:-rocksdb}
9898
s3.endpoint: http://minio:9000
9999
s3.access-key: minio
100100
s3.secret-key: minio123

0 commit comments

Comments
 (0)