mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-client: Treat empty __db_sequence_number__ record as 0
This fixes the issue of transaction commit failing due to an empty __db_sequence_number__ record in persistent database left by previous cancelled transaction. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
6179c3aef8
commit
8dc416c069
@ -4186,6 +4186,11 @@ static int ctdb_fetch_db_seqnum(struct ctdb_db_context *ctdb_db, uint64_t *seqnu
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (data.dsize == 0) {
|
||||
*seqnum = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (data.dsize != sizeof(*seqnum)) {
|
||||
DEBUG(DEBUG_ERR, (__location__ " Invalid data recived len=%zi\n",
|
||||
data.dsize));
|
||||
|
Loading…
Reference in New Issue
Block a user