diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-12-11 17:01:53 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-12-11 17:01:53 +1100 |
commit | bf3deca2d27d98a0b6c7a9ea947324677cb686fd (patch) | |
tree | decb5841582b88d3ab312b2523862cf235b47c08 /src/reconcile | |
parent | 4bba3a3865592e2b4c76702651f043ebb02c86ad (diff) | |
parent | 4631ec39c391186c60522c4607cbb66bc9e625b9 (diff) | |
download | mongo-bf3deca2d27d98a0b6c7a9ea947324677cb686fd.tar.gz |
Merge pull request #2368 from wiredtiger/wt-2246-faster-column-appends
WT-2246: faster column appends
Diffstat (limited to 'src/reconcile')
-rw-r--r-- | src/reconcile/rec_write.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/reconcile/rec_write.c b/src/reconcile/rec_write.c index 0a4c64052de..b31e98422f5 100644 --- a/src/reconcile/rec_write.c +++ b/src/reconcile/rec_write.c @@ -4467,7 +4467,7 @@ compare: /* WT_ERR(__rec_txn_read(session, r, ins, NULL, NULL, &upd)); if (upd == NULL) continue; - for (n = WT_INSERT_RECNO(ins); src_recno <= n; ++src_recno) { + for (n = WT_INSERT_RECNO(ins); src_recno <= n;) { /* * The application may have inserted records which left * gaps in the name space, and these gaps can be huge. @@ -4507,7 +4507,7 @@ compare: /* last->size == size && memcmp(last->data, data, size) == 0)) { ++rle; - continue; + goto next; } WT_ERR(__rec_col_var_helper(session, r, salvage, last, last_deleted, 0, rle)); @@ -4526,6 +4526,15 @@ compare: /* } last_deleted = deleted; rle = 1; + + /* + * Move to the next record. It's not a simple increment + * because if it's the maximum record, incrementing it + * wraps to 0 and this turns into an infinite loop. + */ +next: if (src_recno == UINT64_MAX) + break; + ++src_recno; } } |