Subham-KRLX opened a new issue, #4717:
URL: https://github.com/apache/iggy/issues/4717

   ### Bug description
   
   Newest-first pagination repeats messages on the final partial page.
   
   With 25 messages (offsets 0–24):
   - Page 1: offsets 24–5.
   - Page 2: offsets 19–0; expected 4–0.
   The final page still requests 20 messages repeating 15.
   
   Reproduced with the existing loader and a mocked API. Browser verification 
is pending.
   I would like to contribute a regression test first and discuss the fix per 
the guidelines. Could you assign this to me?
   
   ### Affected area / component
   
   Web UI
   
   ### Deployment
   
   Not applicable
   
   ### Versions
   
   785a456c9279cf2133d7d5ddbd1bb5e439047324
   
   ### Hardware / environment
   
   Local macOS, Node.js v24.4.1; isolated loader reproduction with a mocked 
API. No server or storage involved.
   
   ### Sample code
   
   _No response_
   
   ### Logs
   
   _No response_
   
   ### Iggy server config
   
   _No response_
   
   ### Reproduction
   
   Isolated loader reproduction (mocked API, not browser-tested):
   
   1. Supply a partition with 25 messages at offsets 0–24 and currentOffset = 
24.
   2. Execute the existing page loader in descending order: it requests offset 
5 count 20.
   3. Use the component's page-2 calculation: max(0, 25 - 2 × 20) = 0.
   4. Execute the loader with offset=0: it still requests count=20, returning 
offsets 0–19.
   5. Reversing the results for display repeats offsets 19–5 from page 1. 
Expected page 2: offsets 4–0 only.
   
   ### Contribution
   
   - [x] I'm willing to submit a pull request to fix this bug
   
   ### Good first issue
   
   - [ ] I think this could be a good first issue for a new contributor


-- 
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