diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index 7b6c2b8197..d2e687092a 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -655,15 +655,11 @@ template future<> update_peer_info(gms::inet_address ep, sstring column template future<> update_peer_info(gms::inet_address ep, sstring column_name, utils::UUID); template future<> update_peer_info(gms::inet_address ep, sstring column_name, net::ipv4_address); -#if 0 - - public static synchronized void updateHintsDropped(InetAddress ep, UUID timePeriod, int value) - { - // with 30 day TTL - String req = "UPDATE system.%s USING TTL 2592000 SET hints_dropped[ ? ] = ? WHERE peer = ?"; - executeInternal(String.format(req, PEER_EVENTS), timePeriod, value, ep); - } -#endif +future<> update_hints_dropped(gms::inet_address ep, utils::UUID time_period, int value) { + // with 30 day TTL + sstring req = "UPDATE system.%s USING TTL 2592000 SET hints_dropped[ ? ] = ? WHERE peer = ?"; + return execute_cql(req, PEER_EVENTS, time_period, value, ep).discard_result(); +} future<> update_schema_version(utils::UUID version) { sstring req = "INSERT INTO system.%s (key, schema_version) VALUES (?, ?)"; diff --git a/db/system_keyspace.hh b/db/system_keyspace.hh index 62f9493d1a..29d5c22e44 100644 --- a/db/system_keyspace.hh +++ b/db/system_keyspace.hh @@ -77,6 +77,8 @@ future<> update_peer_info(gms::inet_address ep, sstring column_name, Value value future<> remove_endpoint(gms::inet_address ep); +future<> update_hints_dropped(gms::inet_address ep, utils::UUID time_period, int value); + std::vector all_tables(); void make(database& db, bool durable);