Make the ctdb parent "mark" the transaction lock once the child process
has frozen/locked the entire database.
This stops the ctdb daemon from using a blocking fcntl() locking on the tdb during the
read traverse during recovery.
CQ
1021388
if (strstr(ctdb_db->db_name, "notify") != NULL) {
continue;
}
if (strstr(ctdb_db->db_name, "notify") != NULL) {
continue;
}
+ if (tdb_transaction_write_lock_mark(ctdb_db->ltdb->tdb) != 0) {
+ return -1;
+ }
if (tdb_lockall_mark(ctdb_db->ltdb->tdb) != 0) {
if (tdb_lockall_mark(ctdb_db->ltdb->tdb) != 0) {
+ tdb_transaction_write_lock_unmark(ctdb_db->ltdb->tdb);
if (strstr(ctdb_db->db_name, "notify") == NULL) {
continue;
}
if (strstr(ctdb_db->db_name, "notify") == NULL) {
continue;
}
+ if (tdb_transaction_write_lock_mark(ctdb_db->ltdb->tdb) != 0) {
+ return -1;
+ }
if (tdb_lockall_mark(ctdb_db->ltdb->tdb) != 0) {
if (tdb_lockall_mark(ctdb_db->ltdb->tdb) != 0) {
+ tdb_transaction_write_lock_unmark(ctdb_db->ltdb->tdb);
if (ctdb_db->priority != priority) {
continue;
}
if (ctdb_db->priority != priority) {
continue;
}
+ tdb_transaction_write_lock_unmark(ctdb_db->ltdb->tdb);
if (tdb_lockall_unmark(ctdb_db->ltdb->tdb) != 0) {
return -1;
}
if (tdb_lockall_unmark(ctdb_db->ltdb->tdb) != 0) {
return -1;
}