Changeset: 45a83ef60c1a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/45a83ef60c1a
Modified Files:
sql/storage/bat/bat_storage.c
Branch: smart-merge-jan22
Log Message:
Reformat code a bit.
diffs (17 lines):
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -407,9 +407,10 @@ merge_segments(storage *s, sql_trans *tr
if (seg->deleted == cur->deleted && cur->ts <
TRANSACTION_ID_BASE) {
int merge = 1;
for (int i = 0; active[i] != 0; i++) {
- if (active[i] != tr->ts /* the
transaction can ignore its own active timestamp since it's committing */
- && ((active[i] >= seg->ts &&
active[i] <= cur->ts)
- || (active[i] <=
seg->ts && active[i] >= cur->ts))) {
+ assert(active[i] != seg->ts &&
active[i] != cur->ts);
+ if (active[i] != tr->ts) /* the
transaction can ignore its own active timestamp since it's committing */
+ if ((active[i] > seg->ts && active[i] <
cur->ts) ||
+ (active[i] < seg->ts &&
active[i] > cur->ts)) {
/* cannot safely merge since
there is an active transaction between the segments */
merge = 0;
break;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]