Skip to content

Commit

Permalink
Use correct checkpoint LSN
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Douglas <[email protected]>
  • Loading branch information
morgando committed Aug 14, 2024
1 parent 63615ea commit 4b87d3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions berkdb/rep/rep_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -3735,6 +3735,13 @@ gap_check: max_lsn_dbtp = NULL;
__func__, ret);
goto err;
}

if (dbenv->txmap != NULL) {
Pthread_mutex_lock(&dbenv->txmap->txmap_mutexp);
dbenv->txmap->highest_checkpoint_lsn = ckp_args->ckp_lsn;
Pthread_mutex_unlock(&dbenv->txmap->txmap_mutexp);
}

__os_free(dbenv, ckp_args);
if (gbl_flush_log_at_checkpoint)
__log_flush(dbenv, NULL);
Expand Down
6 changes: 6 additions & 0 deletions berkdb/txn/txn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3036,6 +3036,12 @@ __txn_checkpoint(dbenv, kbytes, minutes, flags)
return ret;
}

if (dbenv->txmap != NULL) {
Pthread_mutex_lock(&dbenv->txmap->txmap_mutexp);
dbenv->txmap->highest_checkpoint_lsn = ckp_lsn;
Pthread_mutex_unlock(&dbenv->txmap->txmap_mutexp);
}

ret = __log_flush_pp(dbenv, NULL);
if (ret == 0)
__txn_updateckp(dbenv, &ckp_lsn); /* this is the output lsn from txn_ckp_log */
Expand Down

0 comments on commit 4b87d3c

Please sign in to comment.