Changeset: 7566f6b7f064 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7566f6b7f064
Modified Files:
        sql/storage/bat/bat_storage.c
Branch: unlock
Log Message:

small optimization, ie condense all claims in one transaction


diffs (16 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
@@ -1012,7 +1012,11 @@ claim_tab(sql_trans *tr, sql_table *t, s
                        ps->segs->end = ps->segs->head->end = ps->end;
        } else {
                assert(ps->end <= ps->segs->end);
-               ps->segs->head = new_segment(ps->segs->head, tr, cnt);
+               if (ps->segs->head->owner == tr) {
+                       ps->segs->head->end += cnt;
+               } else {
+                       ps->segs->head = new_segment(ps->segs->head, tr, cnt);
+               }
                s->end = ps->end = ps->segs->end = ps->segs->head->end;
        }
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to