summaryrefslogtreecommitdiff
path: root/build_win
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2017-06-22 19:33:28 -0400
committerGitHub <noreply@github.com>2017-06-22 19:33:28 -0400
commit8fdaf89904964bd3c9593286bd33d3398ba8e233 (patch)
tree98124d111fab3f24a3708251244e7a901eb61a3c /build_win
parent20679618e5f84863ef6baadc230be0b2d858f09c (diff)
downloadmongo-8fdaf89904964bd3c9593286bd33d3398ba8e233.tar.gz
WT-3181 Add timestamp support. (#3373)
* MongoDB needs to control the logical order of operations and read as of timestamps that are meaningful to the (distributed) system. * threads can race setting the oldest timestamp, make sure it moves forward; * track whether a commit_timestamp was active when updates were created, only set timestamps on commit for updates that didn't get one. * Update test/checkpoint to exercise timestamps, which requires a read_timestamp parameter to checkpoints. This uncovered a bug where reads in progress when the oldest timestamp is updated were not being tracked (so updates could be discarded, leading to inconsistent results). * Errors in commit_transaction now trigger rollback (as documented). * Split timestamp-specific functions into their own source file. * Create a type for raw timestamps to avoid repeating `uint8_t timestamp[TIMESTAMP_SIZE]` everywhere a timestamp is needed. Add some macro helpers to eliminate some cases of `#ifdef HAVE_TIMESTAMPS`. * Rename 's/_ts/_timestamp/g' apart from uses in LSM where we were storing a `struct timespec`, which were renamed 's/_ts/_time/g'. * If a timestamp query cannot be satisfied, return WT_NOTFOUND. * Try to update the pinned timestamp if it is behind the the oldest timestamp. The check on timestamps being stable is slightly different to the check on transactions being stable because we know transactions are committed before we check timestamps. * Track and check the minimum timestamp during reconciliation. * Timestamp methods can return WT_NOTFOUND, don't make to ENOENT.
Diffstat (limited to 'build_win')
-rw-r--r--build_win/wiredtiger_config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/build_win/wiredtiger_config.h b/build_win/wiredtiger_config.h
index 78d2784cb70..b118cfa9882 100644
--- a/build_win/wiredtiger_config.h
+++ b/build_win/wiredtiger_config.h
@@ -133,6 +133,9 @@
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
+/* Size of a transaction timestamp in bytes */
+#define WT_TIMESTAMP_SIZE 8
+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD