示例#1
0
void
QOTstatisticsExit(void)
{
	bat names[5];

	if( qotStat[QOTnames] == NULL)
		return;
	MT_lock_set(&qotlock, "QOT statistics");
	names[0] = 0;
	names[1] = abs(qotStat[QOTnames]->batCacheid);
	names[2] = abs(qotStat[QOTcalls]->batCacheid);
	names[3] = abs(qotStat[QOTactions]->batCacheid);
	names[4] = abs(qotStat[QOTtimings]->batCacheid);

	TMsubcommit_list(names, 5);
	MT_lock_unset(&qotlock, "QOT statistics");
}
示例#2
0
	if (subcommit == NULL)
		return GDK_FAIL;

	subcommit[0] = 0;	/* BBP artifact: slot 0 in the array will be ignored */
	/* collect the list and save the new bats outside any
	 * locking */
	BATloop(b, p, q) {
		bat bid = BBPindex((str) BUNtail(bi, p));

		if (bid < 0)
			bid = -bid;
		if (bid)
			subcommit[cnt++] = bid;
	}

	ret = TMsubcommit_list(subcommit, cnt);
	GDKfree(subcommit);
	return ret;
}

/*
 * @- TMabort
 * Transaction abort is cheap. We use the delta statuses to go back to
 * the previous version of each BAT. Also for BATs that are currently
 * swapped out. Persistent BATs that were made transient in this
 * transaction become persistent again.
 */
void
TMabort(void)
{
	int i;