You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node SDK: delete segments count limit and error message don't match the server #4850
serializeSegmentsParams in foreign/node/src/wire/segment/segment.utils.ts rejects a segments count below 1 or above 1000. The server doesn't enforce that range: DeleteSegments::validate in core/common/src/http/segments/delete_segments.rs returns Ok(()) for any u32. The doc comment on segments_count in the same file says "max value is 1000", so the docs and the server disagree as well.
The Node error message is also wrong. It says Topic partition_count must be between 1 and 1000, copied from the partition code, but the check is on segmentsCount.
To decide:
the valid range: enforce 1..=1000 on the server, or drop the cap in the Node SDK and fix the doc comment
change the Node message to name segments_count
Found while adding tests in #4829, which currently pin the 1..=1000 range.
Hi! I'd be interested in contributing to this issue.
I've inspected serializeSegmentsParams and the server-side DeleteSegments::validate() implementation. I agree that the current behaviour is inconsistent, particularly because the Node SDK enforces a limit that the server doesn't.
Before proposing a change, I'd like to confirm the intended contract: should the server enforce the 1..=1000 range or should the Node SDK accept the full u32 range and update the documentation accordingly?
I can take care of the agreed implementation, correcting the validation message and adding regression tests. Would it be okay for me to work on this?
Activity
Abhishekpandey123-git commentedon Nov 12, 2026
Hi @justinmclean, I'd like to work on this issue.
I've looked at the inconsistency between the Node SDK validation and the server-side
DeleteSegments::validate()behavior. I can take care of:segments_countcontract between the SDK, server, and documentation;segments_count;I’m happy to take this on if it’s available. Please assign it to me.
biswaskunu commentedon Nov 13, 2026
Hi! I'd be interested in contributing to this issue.
I've inspected serializeSegmentsParams and the server-side DeleteSegments::validate() implementation. I agree that the current behaviour is inconsistent, particularly because the Node SDK enforces a limit that the server doesn't.
Before proposing a change, I'd like to confirm the intended contract: should the server enforce the 1..=1000 range or should the Node SDK accept the full u32 range and update the documentation accordingly?
I can take care of the agreed implementation, correcting the validation message and adding regression tests. Would it be okay for me to work on this?
justinmclean commentedon Nov 15, 2026
Thanks both. I have assigned this to @Abhishekpandey123-git, who asked first.
biswaskunu commentedon Nov 16, 2026