t.db_id = ctdb_db->id;
t.srvid = state->srvid;
t.reqid = 0;
+ t.withemptyrecords = false;
state->handle = new_ctdb_control_request(ctdb,
CTDB_CONTROL_TRAVERSE_START,
ctdb_traverse_fn_t callback;
struct timeval start_time;
struct ctdb_queue *queue;
+ bool withemptyrecords;
};
/*
if (h->ctdb_db->persistent == 0) {
/* filter out zero-length records */
- if (data.dsize <= sizeof(struct ctdb_ltdb_header)) {
+ if (!h->withemptyrecords &&
+ data.dsize <= sizeof(struct ctdb_ltdb_header))
+ {
return 0;
}
uint32_t srcnode;
uint32_t client_reqid;
uint64_t srvid;
+ bool withemptyrecords;
};
/*
h->ctdb_db = ctdb_db;
h->client_reqid = all_state->client_reqid;
h->srvid = all_state->srvid;
+ h->withemptyrecords = all_state->withemptyrecords;
if (h->child == 0) {
/* start the traverse in the child */
uint32_t pnn;
uint32_t client_reqid;
uint64_t srvid;
+ bool withemptyrecords;
};
/* called when a traverse times out */
uint32_t reqid;
uint32_t db_id;
uint64_t srvid;
+ bool withemptyrecords;
};
r.pnn = ctdb->pnn;
r.client_reqid = start_state->reqid;
r.srvid = start_state->srvid;
+ r.withemptyrecords = start_state->withemptyrecords;
data.dptr = (uint8_t *)&r;
data.dsize = sizeof(r);
state->ctdb = ctdb;
state->client_reqid = c->client_reqid;
state->srvid = c->srvid;
+ state->withemptyrecords = c->withemptyrecords;
state->h = ctdb_traverse_local(ctdb_db, traverse_all_callback, state);
if (state->h == NULL) {
state->srvid = d->srvid;
state->db_id = d->db_id;
state->ctdb = ctdb;
+ state->withemptyrecords = d->withemptyrecords;
state->h = ctdb_daemon_traverse_all(ctdb_db, traverse_start_callback, state);
if (state->h == NULL) {