From 3d998f9ad678b6144f0401e0258196947dc43292 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 18 Sep 2023 20:47:13 +0300 Subject: [PATCH] Add provider streaming_log capability --- include/wsrep/provider.hpp | 6 +++++- src/provider.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/wsrep/provider.hpp b/include/wsrep/provider.hpp index c782977..ff04415 100644 --- a/include/wsrep/provider.hpp +++ b/include/wsrep/provider.hpp @@ -285,11 +285,15 @@ namespace wsrep static const int streaming = (1 << 15); static const int snapshot = (1 << 16); static const int nbo = (1 << 17); - + static const int streaming_log = (1 << 18); /** decipher capability bitmask */ static std::string str(int); }; + bool has_streaming_log() const { + return (capabilities() & capability::streaming_log) != 0; + } + provider(wsrep::server_state& server_state) : server_state_(server_state) { } diff --git a/src/provider.cpp b/src/provider.cpp index 793192a..f53da4a 100644 --- a/src/provider.cpp +++ b/src/provider.cpp @@ -120,7 +120,7 @@ std::string wsrep::provider::capability::str(int caps) WSREP_PRINT_CAPABILITY(streaming, "STREAMING"); WSREP_PRINT_CAPABILITY(snapshot, "READ_VIEW"); WSREP_PRINT_CAPABILITY(nbo, "NBO"); - + WSREP_PRINT_CAPABILITY(streaming_log, "STREAMING_LOG"); #undef WSREP_PRINT_CAPABILITY if (caps)