Changeset: 9eb98212aa3a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/9eb98212aa3a Modified Files: sql/storage/bat/bat_storage.c Branch: Jun2020 Log Message:
make sure only large enough tables are 'snapshoted' diffs (29 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 @@ -2389,6 +2389,7 @@ tr_update_delta( sql_trans *tr, sql_delt /* for cleared tables the bid is reset */ if (cbat->bid == 0) { + assert(cbat->cleared); cbat->bid = obat->bid; if (cbat->bid) temp_dup(cbat->bid); @@ -2421,11 +2422,13 @@ tr_update_delta( sql_trans *tr, sql_delt cbat->cached = NULL; if (!obat->bid) { cur = temp_descriptor(obat->ibid); - obat->bid = obat->ibid; - obat->cnt = obat->ibase = BATcount(cur); - obat->ibid = e_bat(cur->ttype); + if (BATcount(cur) > SNAPSHOT_MINSIZE) { + obat->bid = obat->ibid; + obat->cnt = obat->ibase = BATcount(cur); + obat->ibid = e_bat(cur->ttype); + obat->cleared = 0; + } bat_destroy(cur); - obat->cleared = 0; } return ok; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list