Files
seaweedfs/weed/mq/kafka/protocol
chrislu 97be7c6aee simplify: Rely on in-memory commit as source of truth for offsets
INSIGHT:
User correctly pointed out: 'kafka gateway should just use the SMQ async
offset committing' - we shouldn't manually create goroutines to wrap SMQ.

REVISED APPROACH:
1. **In-memory commit** is the primary source of truth
   - Immediate response to client
   - Consumers rely on this for offset tracking
   - Fast < 1ms operation

2. **SMQ persistence** is best-effort for durability
   - Used for crash recovery when in-memory lost
   - Sync call (no manual goroutine wrapping)
   - If it fails, not fatal - in-memory is current state

DESIGN:
- In-memory: Authoritative, always succeeds (or client sees error)
- SMQ storage: Durable, failure is logged but non-fatal
- Auto-commit: Periodically pushes offsets to SMQ
- Manual commit: Explicit confirmation of offset progress

This matches Kafka semantics where:
- Broker always knows current offsets in-memory
- Persistent storage is for recovery scenarios
- No artificial blocking on persistence

EXPECTED BEHAVIOR:
- Fast offset response (unblocked by SMQ writes)
- Durable offset storage (via SMQ periodic persistence)
- Correct offset recovery on restarts
- No message loss or duplicates when offsets committed
2025-10-16 23:53:48 -07:00
..
2025-10-13 18:05:17 -07:00
2025-10-14 18:22:09 -07:00
2025-10-16 10:42:18 -07:00
2025-10-13 18:05:17 -07:00
2025-10-16 20:28:21 -07:00
2025-10-13 18:05:17 -07:00
2025-10-16 19:25:51 -07:00
2025-10-13 18:05:17 -07:00