static struct db_record *fetch_locked_internal(struct db_ctdb_ctx *ctx,
TALLOC_CTX *mem_ctx,
- TDB_DATA key,
- bool tryonly)
+ TDB_DATA key)
{
struct db_record *result;
struct db_ctdb_rec *crec;
}
GetTimeOfDay(&chainlock_start);
- lockret = tryonly
- ? tdb_chainlock_nonblock(ctx->wtdb->tdb, key)
- : tdb_chainlock(ctx->wtdb->tdb, key);
+ lockret = tdb_chainlock(ctx->wtdb->tdb, key);
chainlock_time += timeval_elapsed(&chainlock_start);
if (lockret != 0) {
tdb_chainunlock(ctx->wtdb->tdb, key);
talloc_set_destructor(result, NULL);
- if (tryonly && (migrate_attempts != 0)) {
- DEBUG(5, ("record migrated away again\n"));
- TALLOC_FREE(result);
- return NULL;
- }
-
migrate_attempts += 1;
DEBUG(10, ("ctdb_data.dptr = %p, dmaster = %"PRIu32" "
return db_ctdb_fetch_locked_persistent(ctx, mem_ctx, key);
}
- return fetch_locked_internal(ctx, mem_ctx, key, false);
+ return fetch_locked_internal(ctx, mem_ctx, key);
}
struct db_ctdb_parse_record_state {