mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 19:35:12 +00:00
Turns out the fixf591c9c710wasn't enough to make sure all input streams are properly closed on failure. It only closes the main input stream that belongs to context, but it misses all the input streams that can be opened in the consumer for promote index reading. Consumer stores a list of indexes, where each of them has its own input stream. On failure, we need to make sure that every single one of them is properly closed before destroying the indexes as that could cause memory corruption due to read ahead. Fixes #6924. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Message-Id: <20200727182214.377140-1-raphaelsc@scylladb.com> (cherry picked from commit0d70efa58e)