Empty record with rsn=0 should not be written on any other node other than
dmaster. This is however not true for persistent databases. So currently
apply the check only for volatile databases.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
if (data) {
*data = d2;
}
- ctdb_ltdb_store(ctdb_db, key, header, d2);
+ if (ctdb_db->persistent || header->dmaster == ctdb_db->ctdb->pnn) {
+ ctdb_ltdb_store(ctdb_db, key, header, d2);
+ }
return 0;
}