Browse Source

ckdb - ignore non-processed workmarkers when determining the reload point

master
kanoi 9 years ago
parent
commit
d383285b3d
  1. 2
      src/ckdb.h
  2. 19
      src/ckdb_dbio.c

2
src/ckdb.h

@ -55,7 +55,7 @@
#define DB_VLOCK "1" #define DB_VLOCK "1"
#define DB_VERSION "1.0.3" #define DB_VERSION "1.0.3"
#define CKDB_VERSION DB_VERSION"-1.321" #define CKDB_VERSION DB_VERSION"-1.322"
#define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__ #define WHERE_FFL_HERE __FILE__, __func__, __LINE__

19
src/ckdb_dbio.c

@ -6872,7 +6872,24 @@ bool workmarkers_fill(PGconn *conn)
} }
row->pps_value = workinfo_pps(wi_item, row->workinfoidend, false); row->pps_value = workinfo_pps(wi_item, row->workinfoidend, false);
if (dbstatus.newest_workmarker_workinfoid < row->workinfoidend) { if (CURRENT(&(row->expirydate)) &&
!WMPROCESSED(row->status)) {
LOGWARNING("%s(): WARNING workmarkerid %"PRId64" (%s)"
" wid end %"PRId64" isn't processed! (%s) "
"You should abort ckdb and mark it if it "
"actually has already been processed",
__func__, row->markerid, row->description,
row->workinfoidend, row->status);
}
/* Ignore any workmarker that isn't processed, so that the
* necessary data to process it can be reloaded, if the
* workmarker is after the last processed shift
* Any CURRENT non-processed workmarkers will give a console
* warning (above) */
if (CURRENT(&(row->expirydate)) &&
WMPROCESSED(row->status) &&
dbstatus.newest_workmarker_workinfoid < row->workinfoidend) {
dbstatus.newest_workmarker_workinfoid = row->workinfoidend; dbstatus.newest_workmarker_workinfoid = row->workinfoidend;
if (!wi_item) { if (!wi_item) {
LOGEMERG("%s(): FAILURE workmarkerid %"PRId64 LOGEMERG("%s(): FAILURE workmarkerid %"PRId64

Loading…
Cancel
Save