mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
storage_service: Add missing return in pieces empty check
If pieces.empty is empty, it is bogus to access pieces[0]:
sstring move_name = pieces[0];
Fix by adding the missing return.
Spotted by Vlad Zolotarov <vladz@scylladb.com>
Fixes #3258
Message-Id: <bcb446f34f953bc51c3704d06630b53fda82e8d2.1520297558.git.asias@scylladb.com>
(cherry picked from commit 8900e830a3)
This commit is contained in:
@@ -991,6 +991,7 @@ void storage_service::on_change(inet_address endpoint, application_state state,
|
||||
boost::split(pieces, value.value, boost::is_any_of(sstring(versioned_value::DELIMITER_STR)));
|
||||
if (pieces.empty()) {
|
||||
slogger.warn("Fail to split status in on_change: endpoint={}, app_state={}, value={}", endpoint, state, value);
|
||||
return;
|
||||
}
|
||||
sstring move_name = pieces[0];
|
||||
if (move_name == sstring(versioned_value::STATUS_BOOTSTRAPPING)) {
|
||||
|
||||
Reference in New Issue
Block a user