Skip to content

Instantly share code, notes, and snippets.

View toddlipcon's full-sized avatar

Todd Lipcon toddlipcon

View GitHub Profile
CHECK_EQ(buf->size(), 4096);
int fd = open(path.c_str(), O_RDWR | O_DSYNC | O_DIRECT);
CHECK(fd != -1);
int n = write(fd, buf->data(), buf->size());
CHECK_EQ(n, buf->size());
CHECK_ERR(fdatasync(fd));
close(fd);
consensus_meta_ 82379 [025] 7678955.085035: syscalls:sys_enter_open: filename: 0x0205bcd8, flags: 0x00005002, mode: 0x00001000
consensus_meta_ 82379 [025] 7678955.085046: syscalls:sys_exit_open: 0xd
consensus_meta_ 82379 [025] 7678955.085049: syscalls:sys_enter_write: fd: 0x0000000d, buf: 0x021b2000, count: 0x00001000
consensus_meta_ 82379 [002] 7678955.107519: syscalls:sys_exit_write: 0x1000
consensus_meta_ 82379 [002] 7678955.107524: syscalls:sys_enter_fdatasync: fd: 0x0000000d
consensus_meta_ 82379 [002] 7678955.131420: syscalls:sys_exit_fdatasync: 0x0
consensus_meta_ 82379 [002] 7678955.131567: syscalls:sys_enter_open: filename: 0x0205bcd8, flags: 0x00005002, mode: 0x00001000
consensus_meta_ 82379 [002] 7678955.131576: syscalls:sys_exit_open: 0x8
consensus_meta_ 82379 [002] 7678955.131578: syscalls:sys_enter_write: fd: 0x00000008, buf: 0x021b2000, count: 0x00001000
consensus_meta_ 82379 [002] 7678955.200000: syscalls:sys_exit_write: 0x1000
// TODO(KUDU-2267) an existing token-based client caches its connection to the cluster.
// The cluster restarts, but the client then tries to connect back to the same master
// it previously knew to be the leader. It then fails to authenticate and doesn't retry.
// Ignored until this is fixed.
@Ignore
@Test
public void testReconnectToRestartedClusterWithToken() throws Exception {
syncClient.listTabletServers();
Assert.assertNotNull(syncClient.asyncClient.securityContext.getAuthenticationToken());
#include <krb5/krb5.h>
#include <memory>
#include <iostream>
using namespace std;
string k5_err(krb5_context ctx, krb5_error_code code) {
std::unique_ptr<const char, std::function<void(const char*)>> err_msg(
krb5_get_error_message(ctx, code),
std::bind(krb5_free_error_message, ctx, std::placeholders::_1));
#include <iostream>
#include <string.h>
// Locate substring
//
// Returns a pointer to the first occurrence of ‘needle’ in ‘haystack’,
// or a null pointer if ‘needle’ is not part of ‘haystack’.
//
// The matching process does not include the terminating
// null-characters, but it stops there.
diff --git a/src/kudu/common/partition_pruner-test.cc b/src/kudu/common/partition_pruner-test.cc
index 0208529..e1486cf 100644
--- a/src/kudu/common/partition_pruner-test.cc
+++ b/src/kudu/common/partition_pruner-test.cc
@@ -40,6 +40,8 @@
#include "kudu/gutil/gscoped_ptr.h"
#include "kudu/gutil/move.h"
#include "kudu/gutil/strings/substitute.h"
+#include "kudu/util/auto_release_pool.h"
+#include "kudu/util/memory/arena.h"
diff --git a/src/kudu/common/partition_pruner-test.cc b/src/kudu/common/partition_pruner-test.cc
index 0208529..77580ff 100644
--- a/src/kudu/common/partition_pruner-test.cc
+++ b/src/kudu/common/partition_pruner-test.cc
@@ -40,6 +40,8 @@
#include "kudu/gutil/gscoped_ptr.h"
#include "kudu/gutil/move.h"
#include "kudu/gutil/strings/substitute.h"
+#include "kudu/util/auto_release_pool.h"
+#include "kudu/util/memory/arena.h"
@toddlipcon
toddlipcon / -
Created September 26, 2017 17:51
2017-09-26 17:45:48:927 4060 sec: 23967984 operations; 0 current ops/sec; est completion in 3 hours 34 minutes [INSERT: Count=0, Max=0, Min=9223372036854775807, Avg=�, 90=0, 99=0, 99.9=0, 99.99=0]
2017-09-26 17:45:58:927 4070 sec: 23967984 operations; 0 current ops/sec; est completion in 3 hours 35 minutes [INSERT: Count=0, Max=0, Min=9223372036854775807, Avg=�, 90=0, 99=0, 99.9=0, 99.99=0]
2017-09-26 17:46:08:927 4080 sec: 23967984 operations; 0 current ops/sec; est completion in 3 hours 35 minutes [INSERT: Count=0, Max=0, Min=9223372036854775807, Avg=�, 90=0, 99=0, 99.9=0, 99.99=0]
2017-09-26 17:46:18:927 4090 sec: 23967984 operations; 0 current ops/sec; est completion in 3 hours 36 minutes [INSERT: Count=0, Max=0, Min=9223372036854775807, Avg=�, 90=0, 99=0, 99.9=0, 99.99=0]
2017-09-26 17:46:28:927 4100 sec: 23967984 operations; 0 current ops/sec; est completion in 3 hours 36 minutes [INSERT: Count=0, Max=0, Min=9223372036854775807, Avg=�, 90=0, 99=0, 99.9=0, 99.99=0]
2017-09-26 17:46:38:927 4110 sec:
@toddlipcon
toddlipcon / -
Created September 26, 2017 16:49
2017-09-26 16:42:58:927 290 sec: 7469984 operations; 8700 current ops/sec; est completion in 59 minutes [INSERT: Count=87000, Max=1202175, Min=4, Avg=372.79, 90=7, 99=12, 99.9=26223, 99.99=698367]
2017-09-26 16:43:08:927 300 sec: 7746984 operations; 27702.77 current ops/sec; est completion in 59 minutes [INSERT: Count=277000, Max=13164543, Min=4, Avg=1043.71, 90=8, 99=12, 99.9=25791, 99.99=839679]
2017-09-26 16:43:18:927 310 sec: 8165984 operations; 41900 current ops/sec; est completion in 58 minutes [INSERT: Count=419000, Max=2197503, Min=4, Avg=379.93, 90=8, 99=12, 99.9=597, 99.99=732671]
2017-09-26 16:43:28:927 320 sec: 8507984 operations; 34200 current ops/sec; est completion in 57 minutes [INSERT: Count=342000, Max=2957311, Min=4, Avg=467, 90=8, 99=12, 99.9=22015, 99.99=921599]
2017-09-26 16:43:38:927 330 sec: 8917984 operations; 41000 current ops/sec; est completion in 56 minutes [INSERT: Count=410000, Max=1417215, Min=4, Avg=385.41, 90=8, 99=12, 99.9=18271, 99.99=696831]
2017-09-26 16:43:48:927 34
@toddlipcon
toddlipcon / -
Created September 26, 2017 15:21
2017-09-26 15:15:16:235 370 sec: 8901173 operations; 30640.6 current ops/sec; est completion in 1 hour 3 minutes [INSERT: Count=306402, Max=893439, Min=5, Avg=520.2, 90=9, 99=16, 99.9=261119, 99.99=668671]
2017-09-26 15:15:26:235 380 sec: 9098984 operations; 19781.1 current ops/sec; est completion in 1 hour 3 minutes [INSERT: Count=197781, Max=824831, Min=5, Avg=559.41, 90=9, 99=15, 99.9=508, 99.99=660479]
2017-09-26 15:15:36:235 390 sec: 9113984 operations; 1500 current ops/sec; est completion in 1 hour 4 minutes [INSERT: Count=15000, Max=9527295, Min=5, Avg=5888.93, 90=9, 99=15, 99.9=158, 99.99=9338879]
2017-09-26 15:15:46:235 400 sec: 9113984 operations; 0 current ops/sec; est completion in 1 hour 6 minutes [INSERT: Count=0, Max=0, Min=9223372036854775807, Avg=�, 90=0, 99=0, 99.9=0, 99.99=0]
2017-09-26 15:15:56:235 410 sec: 9113984 operations; 0 current ops/sec; est completion in 1 hour 8 minutes [INSERT: Count=0, Max=0, Min=9223372036854775807, Avg=�, 90=0, 99=0, 99.9=0, 99.99=0]
2017-09-26 15:16:06: