A broker crashes after "contiguous_range_map keys must be positive. current key -1" error log message

Last updated: August 11, 2026

Problem Statement

In the Redpanda version between v24.2.1 and v24.2.4, a broker may crash after the following error message.

Assert failure: ...... 'key >= 0' contiguous_range_map keys must be positive. current key -1

This happens when a consumer application sends a request with a negative partition number, like -1. 

Solution

This is a bug (Issue 23293) and was fixed in v24.2.5. So, If you encounter this bug in the Redpanda version between v24.2.1  and v24.2.4, please upgrade to v24.2.5 or a later version. 

Notes

This bug was a regression. Version 24.1 does not have this issue.