mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 22:43:15 +00:00
Accessing tm.sorted_tokens().back() causes undefined behavior if tm.sorted_tokens is empty. Check that first and throw/abort using on_internal_error in this case. This will prevent the segfault but it doesn't fix the root cause which is getting here with empty token_metadata. That will be fixed by the following patch. Refs #9494 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Message-Id: <20211019075710.1626808-1-bhalevy@scylladb.com>