mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 17:40:34 +00:00
Currently, data structures used in manager.hh use their own aliases for gms::inet_address. It is clear they all should use the same type and having different names for it only reduces readability of the code. This commit introduces a common alias -- endpoint_id -- and gets rid of the other ones. This commit is also the first step in modularizing manager.hh by extracting common types to another file.
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
/*
|
|
* Modified by ScyllaDB
|
|
* Copyright (C) 2023-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
#pragma once
|
|
|
|
// Seastar features.
|
|
#include <seastar/util/bool_class.hh>
|
|
|
|
// Scylla includes.
|
|
#include "gms/inet_address.hh"
|
|
|
|
// STD.
|
|
#include <cstdint>
|
|
|
|
namespace db::hints {
|
|
namespace internal {
|
|
|
|
/// Type identifying the host a specific subset of hints should be sent to.
|
|
using endpoint_id = gms::inet_address;
|
|
|
|
/// Tag specifying if hint sending should enter the so-called "drain mode".
|
|
/// If it should, that means that if a failure while sending a hint occurs,
|
|
/// the hint will be ignored rather than attempted to be sent again.
|
|
///
|
|
/// The tag is useful in communication between internal data structures
|
|
/// of the hinted handoff module.
|
|
using drain = seastar::bool_class<class drain_tag>;
|
|
|
|
/// Statistics related to hint sending. They should collect information
|
|
/// about a whole shard.
|
|
struct hint_stats {
|
|
uint64_t size_of_hints_in_progress = 0;
|
|
uint64_t written = 0;
|
|
uint64_t errors = 0;
|
|
uint64_t dropped = 0;
|
|
uint64_t sent = 0;
|
|
uint64_t discarded = 0;
|
|
uint64_t send_errors = 0;
|
|
uint64_t corrupted_files = 0;
|
|
};
|
|
|
|
} // namespace internal
|
|
} // namespace db::hints
|