remove indirect page implementation
This commit is contained in:
parent
2593de7a2c
commit
397b0fa245
6 changed files with 10 additions and 35 deletions
|
@ -18,7 +18,7 @@ ADD_LIBRARY(stasis crc32.c redblack.c lhtable.c rw.c doubleLinkedList.c
|
|||
logger/reorderingHandle.c
|
||||
logger/groupForce.c
|
||||
page/fixed.c compensations.c
|
||||
operations/pageOperations.c page/indirect.c
|
||||
operations/pageOperations.c
|
||||
operations/decrement.c operations/increment.c
|
||||
operations/prepare.c operations/set.c
|
||||
operations/alloc.c operations/noop.c
|
||||
|
|
|
@ -14,7 +14,7 @@ libstasis_la_SOURCES=crc32.c redblack.c lhtable.c rw.c doubleLinkedList.c common
|
|||
logger/reorderingHandle.c \
|
||||
logger/groupForce.c \
|
||||
page/raw.c page/slotted.c page/lsnFree.c page/fixed.c compensations.c \
|
||||
operations/pageOperations.c page/indirect.c operations/decrement.c \
|
||||
operations/pageOperations.c operations/decrement.c \
|
||||
operations/increment.c operations/prepare.c operations/set.c \
|
||||
operations/alloc.c operations/noop.c \
|
||||
operations/arrayList.c hash.c \
|
||||
|
|
|
@ -67,9 +67,6 @@ terms specified in this license.
|
|||
|
||||
*/
|
||||
|
||||
|
||||
/* _XOPEN_SOURCE is needed for posix_memalign */
|
||||
#define _XOPEN_SOURCE 600
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <config.h>
|
||||
|
@ -87,7 +84,6 @@ terms specified in this license.
|
|||
#include <stasis/compensations.h>
|
||||
#include <stasis/page/slotted.h>
|
||||
#include <stasis/page/fixed.h>
|
||||
#include <stasis/page/indirect.h>
|
||||
#include <stasis/operations/arrayList.h>
|
||||
#include <stasis/bufferPool.h>
|
||||
#include <stasis/truncation.h>
|
||||
|
@ -128,7 +124,6 @@ void stasis_page_init(stasis_dirty_page_table_t * dpt) {
|
|||
stasis_page_impl_register(boundaryTagImpl());
|
||||
stasis_page_impl_register(arrayListImpl());
|
||||
stasis_page_impl_register(stasis_page_blob_impl());
|
||||
stasis_page_impl_register(indirectImpl());
|
||||
stasis_page_impl_register(lsmRootImpl());
|
||||
stasis_page_impl_register(slottedLsnFreeImpl());
|
||||
}
|
||||
|
@ -181,9 +176,7 @@ recordid stasis_record_dereference(int xid, Page * p, recordid rid) {
|
|||
assertlocked(p->rwlatch);
|
||||
|
||||
int page_type = p->pageType;
|
||||
if(page_type == INDIRECT_PAGE) {
|
||||
rid = dereferenceIndirectRID(xid, rid);
|
||||
} else if(page_type == ARRAY_LIST_PAGE) {
|
||||
if(page_type == ARRAY_LIST_PAGE) {
|
||||
rid = stasis_array_list_dereference_recordid(xid, p, rid.slot);
|
||||
}
|
||||
return rid;
|
||||
|
|
|
@ -8,7 +8,6 @@ CREATE_CHECK(check_transactional2)
|
|||
CREATE_CHECK(check_recovery)
|
||||
CREATE_CHECK(check_blobRecovery)
|
||||
CREATE_CHECK(check_bufferManager)
|
||||
CREATE_CHECK(check_indirect)
|
||||
CREATE_CHECK(check_pageOperations)
|
||||
CREATE_CHECK(check_linearHash)
|
||||
CREATE_CHECK(check_header)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# INCLUDES = @CHECK_CFLAGS@
|
||||
|
||||
## Had to disable check_lht because lht needs to be rewritten.
|
||||
TESTS = check_lhtable check_logEntry check_logWriter check_page check_operations check_transactional2 check_recovery check_blobRecovery check_bufferManager check_indirect check_pageOperations check_linearHash check_header check_linkedListNTA check_linearHashNTA check_pageOrientedList check_lockManager check_compensations check_errorHandling check_ringbuffer check_iterator check_multiplexer check_bTree check_regions check_allocationPolicy check_io check_rangeTracker check_replacementPolicy check_lsmTree check_groupBy
|
||||
TESTS = check_lhtable check_logEntry check_logWriter check_page check_operations check_transactional2 check_recovery check_blobRecovery check_bufferManager check_pageOperations check_linearHash check_header check_linkedListNTA check_linearHashNTA check_pageOrientedList check_lockManager check_compensations check_errorHandling check_ringbuffer check_iterator check_multiplexer check_bTree check_regions check_allocationPolicy check_io check_rangeTracker check_replacementPolicy check_lsmTree check_groupBy
|
||||
|
||||
noinst_PROGRAMS = $(TESTS)
|
||||
LDADD = $(top_builddir)/src/stasis/libstasis.la
|
||||
CLEANFILES = check_lht.log check_logEntry.log storefile.txt logfile.txt blob0_file.txt blob1_file.txt check_blobRecovery.log check_logWriter.log check_operations.log check_recovery.log check_transactional2.log check_page.log check_bufferManager.log check_indirect.log check_bufferMananger.log check_lladdhash.log check_pageOperations.log check_linearhash.log check_linkedListNTA.log check_linearHashNTA.log check_pageOrientedListNTA.log check_lockManager.log check_compensations.log check_errorhandling.log check_header.log check_iterator.log check_linearHash.log check_ringbuffer.log check_bTree.log check_groupBy.log
|
||||
CLEANFILES = check_lht.log check_logEntry.log storefile.txt logfile.txt blob0_file.txt blob1_file.txt check_blobRecovery.log check_logWriter.log check_operations.log check_recovery.log check_transactional2.log check_page.log check_bufferManager.log check_bufferMananger.log check_lladdhash.log check_pageOperations.log check_linearhash.log check_linkedListNTA.log check_linearHashNTA.log check_pageOrientedListNTA.log check_lockManager.log check_compensations.log check_errorhandling.log check_header.log check_iterator.log check_linearHash.log check_ringbuffer.log check_bTree.log check_groupBy.log
|
||||
AM_CFLAGS=${GLOBAL_CFLAGS}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*---
|
||||
This software is copyrighted by the Regents of the University of
|
||||
California, and other parties. The following terms apply to all files
|
||||
|
@ -48,7 +47,6 @@ terms specified in this license.
|
|||
#include "../check_includes.h"
|
||||
|
||||
#include <stasis/page.h>
|
||||
#include <stasis/page/indirect.h>
|
||||
#include <stasis/page/slotted.h>
|
||||
#include <stasis/blobManager.h>
|
||||
#include <stasis/bufferManager.h>
|
||||
|
@ -491,6 +489,7 @@ START_TEST(fixedPageThreadTest) {
|
|||
pthread_mutex_destroy(&random_mutex);
|
||||
} END_TEST
|
||||
|
||||
|
||||
START_TEST(pageCheckSlotTypeTest) {
|
||||
Tinit();
|
||||
int xid = Tbegin();
|
||||
|
@ -510,23 +509,14 @@ START_TEST(pageCheckSlotTypeTest) {
|
|||
a bit questionable, but should work. */
|
||||
p = loadPage(-1, fixedRoot.page);
|
||||
|
||||
readlock(p->rwlatch, 0);
|
||||
readlock(p->rwlatch, 0);
|
||||
assert(stasis_record_type_read(xid, p, fixedRoot) == NORMAL_SLOT);
|
||||
unlock(p->rwlatch);
|
||||
releasePage(p);
|
||||
|
||||
fixedRoot.slot = 1;
|
||||
// Force it to use indirect implementation (we're checking an array list page...)
|
||||
recordid fixedEntry = dereferenceIndirectRID(xid, fixedRoot);
|
||||
|
||||
fixedRoot.slot = 0;
|
||||
|
||||
unlock(p->rwlatch);
|
||||
releasePage(p);
|
||||
|
||||
p = loadPage(-1, fixedEntry.page);
|
||||
readlock(p->rwlatch, 0);
|
||||
assert(stasis_record_type_read(xid, p, fixedEntry) == NORMAL_SLOT);
|
||||
unlock(p->rwlatch);
|
||||
releasePage(p);
|
||||
assert(TrecordType(xid, fixedRoot) == NORMAL_SLOT);
|
||||
|
||||
p = loadPage(-1, blob.page);
|
||||
readlock(p->rwlatch, 0);
|
||||
|
@ -572,13 +562,6 @@ START_TEST(pageTrecordTypeTest) {
|
|||
assert(TrecordType(xid, fixedRoot) == NORMAL_SLOT);
|
||||
|
||||
fixedRoot.slot = 1;
|
||||
// This is an array list page, but we want to check the state
|
||||
// of the internal node.
|
||||
recordid fixedEntry = dereferenceIndirectRID(xid, fixedRoot);
|
||||
|
||||
fixedRoot.slot = 0;
|
||||
|
||||
assert(TrecordType(xid, fixedEntry) == NORMAL_SLOT);
|
||||
|
||||
int type = TrecordType(xid, blob);
|
||||
assert(type == BLOB_SLOT);
|
||||
|
|
Loading…
Reference in a new issue