Changeset: 6c3b852ffc13 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6c3b852ffc13
Modified Files:
sql/storage/bat/bat_storage.c
Branch: default
Log Message:
Continuing changeset 9e984cfd6561: change incorrect use of farmid in Heap.
In the past, the farmid field in the Heap structure was used for two
different things. It's main purpose has always been the ID of the
database farm where the data is stored (index into BBPfarms). But it
was also, incorrectly, used to determine the role of the heap, as if the
index and the role always coincided. Now we have a role field in the
Heap structure to hole the role of the heap. This fix is probably the
last incorrect use of farmid.
Fixes #8051.
diffs (24 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
@@ -78,16 +78,16 @@ transfer_to_systrans(BAT *b)
BBPreclaim(b);
return bn;
}
- if (b->theap->farmid == TRANSIENT ||
- (b->tvheap && b->tvheap->farmid == TRANSIENT)) {
+ if (b->theap->role == TRANSIENT ||
+ (b->tvheap && b->tvheap->role == TRANSIENT)) {
QryCtx *qc = MT_thread_get_qry_ctx();
if (qc) {
- if (b->theap->farmid == TRANSIENT && b->theap->parentid
== b->batCacheid) {
+ if (b->theap->role == TRANSIENT && b->theap->parentid
== b->batCacheid) {
ATOMIC_SUB(&qc->datasize, b->theap->size);
b->theap->role = SYSTRANS;
b->batRole = SYSTRANS;
}
- if (b->tvheap && b->tvheap->farmid == TRANSIENT &&
b->tvheap->parentid == b->batCacheid) {
+ if (b->tvheap && b->tvheap->role == TRANSIENT &&
b->tvheap->parentid == b->batCacheid) {
ATOMIC_SUB(&qc->datasize, b->tvheap->size);
b->tvheap->role = SYSTRANS;
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]