ryerraguntla opened a new pull request, #4259:
URL: https://github.com/apache/iggy/pull/4259

    
    ## Summary
   
     Wires the Kafka gateway's ListOffsets handler to the real Iggy bridge 
instead of the stub added in #3421. Standalone branch, no file overlap with the 
combined CreateTopics+Metadata PR — safe to review/merge in
     parallel.
   
     With IGGY_KAFKA_BRIDGE_ENABLED=true:
     - LATEST answers from IggyBridge::high_watermarks.
     - EARLIEST answers 0. 
     - Any other requested timestamp (arbitrary-timestamp offset search) is 
unsupported — Iggy exposes no per-message timestamp index — and answers 
UNKNOWN_SERVER_ERROR (-1) per partition rather than a fabricated
     offset.
   
     With the bridge off (default), behavior is unchanged from #3421: 
NOT_LEADER_OR_FOLLOWER (6).
   
     Closes #3537.
   
   ##  What's included
   
     - high_watermarks-backed LATEST/EARLIEST resolution, one bridge round trip 
per distinct topic.
     - Bridge fan-out hardening, consistent with the CreateTopics/Metadata PR: 
dedup requested topic names before any bridge call, MAX_BRIDGE_BACKED_TOPICS = 
100 cap (INVALID_REQUEST, no bridge call above it), fixed
     20s wall-clock deadline over the request's aggregate bridge work (no 
timeout_ms field exists in any version this gateway supports, v0–v6).
     - New error code ERROR_REQUEST_TIMED_OUT used on deadline expiry.
   
   ##  Known gap (not fixed here, tracked separately)
   
     EARLIEST = 0 is correct only for a partition that has never had retention 
trim its first segment. Iggy currently tracks no rolling low-watermark distinct 
from partition creation, so once retention purges a
     partition's first segment, 0 names a log-start offset that no longer 
exists — a real consumer with auto.offset.reset=earliest would seek into a 
hole. Not fixable client-side; needs a core-server change
     (separately drafted as a GitHub issue, not yet filed). Harmless today only 
because Fetch (#3536) is still a stub — nothing yet reads at the offset this 
returns.
   
     Test plan
   
     - cargo build -p iggy-gateway-kafka --all-targets — clean.
     - cargo clippy -p iggy-gateway-kafka --all-features --all-targets -- -D 
warnings — no issues.
     - cargo test -p iggy-gateway-kafka — 291 passed, 15 suites (includes new 
tests/list_offsets_real_bridge_tests.rs, 332 lines).
   
   
   ## AI Usage
    If AI tools were used, please answer:
   
   1. Which tools? Claude code for implementation , Cursor for review and 
validation
   2. Scope of usage? Implementation , review and validation
   3. How did you verify the generated code works correctly? Test Suite and 
Code walkthrough
   4. Can you explain every line of the code if asked? Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to