Beispiel #1
0
void sst_merge(struct sst *sst, struct skiplist *list, int fromlog)
{
	(void) fromlog;
	struct skipnode *x = list->hdr->forward[0];

	/* First time, index is NULL, need to be created */
	if(sst->meta->size == 0)
		_flush_new_list(sst, x, list->count);
	else 
		_flush_list(sst, x, list->hdr, list->count);
	skiplist_free(list);
}
Beispiel #2
0
void silopit_merge(struct silopit *silopit, struct jikukan *list, int fromlog)
{
	struct skipnode *x= list->hdr->forward[0];

	if (fromlog == 1) {
		struct skipnode *cur = x;
		struct skipnode *first = list->hdr;

		__DEBUG(LEVEL_DEBUG, "adding log items to hiraishinfilter");
		while (cur != first) {
			if (cur->opt == ADD)
				hiraishin_add(silopit->hiraishin, cur->key);
			cur = cur->forward[0];
		}
	}

	if (silopit->meta->size == 0)
		 _flush_new_list(silopit, x, list->count);
	else
		_flush_list(silopit, x, list->hdr, list->count);
	jikukan_free(list);
}