Skip to content

Instantly share code, notes, and snippets.

View jul-stas's full-sized avatar

Juliusz Stasiewicz jul-stas

  • ScyllaDB
  • War Saw
View GitHub Profile
#include <cassandra.h>
#include <iostream>
#include <chrono>
#include <thread>
void on_host_listener(CassHostListenerEvent event, const CassInet inet, void *data) {
char address[CASS_INET_STRING_LENGTH];
cass_inet_string(inet, address);
if (event == CASS_HOST_LISTENER_EVENT_ADD) {
@jul-stas
jul-stas / storage_service.cc
Created June 4, 2020 09:33
proposal for exception handling from `read_cdc_topology_description()`
// --- a/service/storage_service.cc
// +++ b/service/storage_service.cc
// @@ -847,8 +847,24 @@ future<> storage_service::check_and_repair_cdc_streams() {
bool should_regenerate = false;
std::optional<cdc::topology_description> gen;
try {
gen = _sys_dist_ks.local().read_cdc_topology_description(
*latest, { _token_metadata.count_normal_token_owners() }).get0();
} catch (exceptions::request_timeout_exception& e) {