Import wiredtiger: 91be485ef76087eae73421de2b0f12a4623b7d24 from branch mongodb-master (#49253)
Co-authored-by: wt-vendoring-bot <wt-vendoring-bot@mongodb.com> GitOrigin-RevId: 26a8a3d269d36c03d5650fbb6522904b6ae37fea
This commit is contained in:
committed by
MongoDB Bot
parent
e2fcd55c0c
commit
e63375a32c
2
src/third_party/wiredtiger/import.data
vendored
2
src/third_party/wiredtiger/import.data
vendored
@@ -2,5 +2,5 @@
|
|||||||
"vendor": "wiredtiger",
|
"vendor": "wiredtiger",
|
||||||
"github": "wiredtiger/wiredtiger",
|
"github": "wiredtiger/wiredtiger",
|
||||||
"branch": "mongodb-master",
|
"branch": "mongodb-master",
|
||||||
"commit": "874fcacca42ab0069d570775ecaee226a0a1bd37"
|
"commit": "91be485ef76087eae73421de2b0f12a4623b7d24"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
/*
|
/*
|
||||||
* We need an appropriately sized buffer for formatted time points, aggregates and windows. This is
|
* We need an appropriately sized buffer for formatted time points, aggregates and windows. This is
|
||||||
* for time windows with 6 timestamps, 2 transaction IDs, 2 prepared IDs, prepare state and
|
* for time windows with 6 timestamps, 2 transaction IDs, 2 prepared IDs, prepare state and
|
||||||
* formatting. The formatting is currently about 64 characters - enough space that we don't need to
|
* formatting. The formatting overhead is currently under 192 characters (field labels, etc.) -
|
||||||
* think about it. Time points have less information that time aggregate windows - cater for the
|
* enough space that we don't need to think about it. Time points have less information that time
|
||||||
* larger here.
|
* aggregate windows - cater for the larger here.
|
||||||
*/
|
*/
|
||||||
#define WT_TIME_STRING_SIZE (WT_TS_INT_STRING_SIZE * 6 + 20 * 4 + 64)
|
#define WT_TIME_STRING_SIZE (WT_TS_INT_STRING_SIZE * 6 + 20 * 4 + 192)
|
||||||
|
|
||||||
/* The time points that define a value's time window and associated prepare information. */
|
/* The time points that define a value's time window and associated prepare information. */
|
||||||
struct __wt_time_window {
|
struct __wt_time_window {
|
||||||
|
|||||||
@@ -46,15 +46,18 @@ __wt_time_window_to_string(WT_TIME_WINDOW *tw, char *tw_string)
|
|||||||
{
|
{
|
||||||
char ts_string[6][WT_TS_INT_STRING_SIZE];
|
char ts_string[6][WT_TS_INT_STRING_SIZE];
|
||||||
|
|
||||||
WT_IGNORE_RET(__wt_snprintf(tw_string, WT_TIME_STRING_SIZE,
|
WT_IGNORE_RET(
|
||||||
"start: %s/%s/%s/%" PRIu64 "/%" PRIu64 " | stop: %s/%s/%s/%" PRIu64 "/%" PRIu64 "%s",
|
__wt_snprintf(tw_string, WT_TIME_STRING_SIZE,
|
||||||
__wt_timestamp_to_string(tw->durable_start_ts, ts_string[0]),
|
"start: durable_timestamp=%s timestamp=%s prepare_timestamp=%s prepared_id=%" PRIu64
|
||||||
__wt_timestamp_to_string(tw->start_ts, ts_string[1]),
|
" transaction=%" PRIu64 " | stop: durable_timestamp=%s timestamp=%s prepare_timestamp=%s "
|
||||||
__wt_timestamp_to_string(tw->start_prepare_ts, ts_string[2]), tw->start_prepared_id,
|
"prepared_id=%" PRIu64 " transaction=%" PRIu64 "%s",
|
||||||
tw->start_txn, __wt_timestamp_to_string(tw->durable_stop_ts, ts_string[3]),
|
__wt_timestamp_to_string(tw->durable_start_ts, ts_string[0]),
|
||||||
__wt_timestamp_to_string(tw->stop_ts, ts_string[4]),
|
__wt_timestamp_to_string(tw->start_ts, ts_string[1]),
|
||||||
__wt_timestamp_to_string(tw->stop_prepare_ts, ts_string[5]), tw->stop_prepared_id,
|
__wt_timestamp_to_string(tw->start_prepare_ts, ts_string[2]), tw->start_prepared_id,
|
||||||
tw->stop_txn, WT_TIME_WINDOW_HAS_PREPARE(tw) ? ", prepared" : ""));
|
tw->start_txn, __wt_timestamp_to_string(tw->durable_stop_ts, ts_string[3]),
|
||||||
|
__wt_timestamp_to_string(tw->stop_ts, ts_string[4]),
|
||||||
|
__wt_timestamp_to_string(tw->stop_prepare_ts, ts_string[5]), tw->stop_prepared_id,
|
||||||
|
tw->stop_txn, WT_TIME_WINDOW_HAS_PREPARE(tw) ? ", prepared" : ""));
|
||||||
return (tw_string);
|
return (tw_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,21 @@ class OpType(Enum):
|
|||||||
SKIP_DEL = 45,
|
SKIP_DEL = 45,
|
||||||
NO_STABLE = 46
|
NO_STABLE = 46
|
||||||
|
|
||||||
|
_TIME_WINDOW_REGEX = (
|
||||||
|
r'start: '
|
||||||
|
r'durable_timestamp=\((\d+), (\d+)\) '
|
||||||
|
r'timestamp=\((\d+), (\d+)\) '
|
||||||
|
r'prepare_timestamp=\((\d+), (\d+)\) '
|
||||||
|
r'prepared_id=(\d+) '
|
||||||
|
r'transaction=(\d+) '
|
||||||
|
r'\| stop: '
|
||||||
|
r'durable_timestamp=\((\d+), (\d+)\) '
|
||||||
|
r'timestamp=\((\d+), (\d+)\) '
|
||||||
|
r'prepare_timestamp=\((\d+), (\d+)\) '
|
||||||
|
r'prepared_id=(\d+) '
|
||||||
|
r'transaction=(\d+)'
|
||||||
|
)
|
||||||
|
|
||||||
class Operation:
|
class Operation:
|
||||||
def __init__(self, line):
|
def __init__(self, line):
|
||||||
self.line = line
|
self.line = line
|
||||||
@@ -297,7 +312,7 @@ class Operation:
|
|||||||
self.type = OpType.HS_UPDATE_ABORT
|
self.type = OpType.HS_UPDATE_ABORT
|
||||||
self.file = self.__extract_file(line)
|
self.file = self.__extract_file(line)
|
||||||
|
|
||||||
matches = re.search('start: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+) \| stop: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+)', line)
|
matches = re.search(_TIME_WINDOW_REGEX, line)
|
||||||
|
|
||||||
durable_start_start = int(matches.group(1))
|
durable_start_start = int(matches.group(1))
|
||||||
durable_start_end = int(matches.group(2))
|
durable_start_end = int(matches.group(2))
|
||||||
@@ -332,7 +347,7 @@ class Operation:
|
|||||||
self.type = OpType.HS_UPDATE_VALID
|
self.type = OpType.HS_UPDATE_VALID
|
||||||
self.file = self.__extract_file(line)
|
self.file = self.__extract_file(line)
|
||||||
|
|
||||||
matches = re.search('start: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+) \| stop: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+)', line)
|
matches = re.search(_TIME_WINDOW_REGEX, line)
|
||||||
|
|
||||||
durable_start_start = int(matches.group(1))
|
durable_start_start = int(matches.group(1))
|
||||||
durable_start_end = int(matches.group(2))
|
durable_start_end = int(matches.group(2))
|
||||||
@@ -391,7 +406,7 @@ class Operation:
|
|||||||
self.type = OpType.HS_GT_ONDISK
|
self.type = OpType.HS_GT_ONDISK
|
||||||
self.file = self.__extract_file(line)
|
self.file = self.__extract_file(line)
|
||||||
|
|
||||||
matches = re.search('start: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+) \| stop: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+)', line)
|
matches = re.search(_TIME_WINDOW_REGEX, line)
|
||||||
|
|
||||||
durable_start_start = int(matches.group(1))
|
durable_start_start = int(matches.group(1))
|
||||||
durable_start_end = int(matches.group(2))
|
durable_start_end = int(matches.group(2))
|
||||||
@@ -430,7 +445,7 @@ class Operation:
|
|||||||
self.type = OpType.HS_STOP_OBSOLETE
|
self.type = OpType.HS_STOP_OBSOLETE
|
||||||
self.file = self.__extract_file(line)
|
self.file = self.__extract_file(line)
|
||||||
|
|
||||||
matches = re.search('start: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+) \| stop: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+)', line)
|
matches = re.search(_TIME_WINDOW_REGEX, line)
|
||||||
durable_start_start = int(matches.group(1))
|
durable_start_start = int(matches.group(1))
|
||||||
durable_start_end = int(matches.group(2))
|
durable_start_end = int(matches.group(2))
|
||||||
self.durable_start = Timestamp(durable_start_start, durable_start_end)
|
self.durable_start = Timestamp(durable_start_start, durable_start_end)
|
||||||
@@ -518,7 +533,7 @@ class Operation:
|
|||||||
self.stop = self.__extract_simple_timestamp('stop_timestamp', line)
|
self.stop = self.__extract_simple_timestamp('stop_timestamp', line)
|
||||||
self.stable = self.__extract_simple_timestamp('stable_timestamp', line)
|
self.stable = self.__extract_simple_timestamp('stable_timestamp', line)
|
||||||
|
|
||||||
matches = re.search('start: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+) \| stop: \((\d+), (\d+)\)/\((\d+), (\d+)\)/\((\d+), (\d+)\)/(\d+)/(\d+)', line)
|
matches = re.search(_TIME_WINDOW_REGEX, line)
|
||||||
|
|
||||||
durable_start_start = int(matches.group(1))
|
durable_start_start = int(matches.group(1))
|
||||||
durable_start_end = int(matches.group(2))
|
durable_start_end = int(matches.group(2))
|
||||||
|
|||||||
Reference in New Issue
Block a user