2010-01-23 02:13:59 +00:00
|
|
|
|
2010-03-17 21:51:26 +00:00
|
|
|
#include <stasis/transactional.h>
|
|
|
|
#undef begin
|
|
|
|
#undef end
|
|
|
|
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
#include "logstore.h"
|
2010-04-12 20:56:54 +00:00
|
|
|
#include "regionAllocator.h"
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
unlink("storefile.txt");
|
|
|
|
unlink("logfile.txt");
|
|
|
|
|
|
|
|
sync();
|
|
|
|
|
2010-04-28 19:21:25 +00:00
|
|
|
logtable<datatuple>::init_stasis();
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
int xid = Tbegin();
|
|
|
|
|
2010-12-11 00:51:19 +00:00
|
|
|
logtable<datatuple> *ltable = new logtable<datatuple>(1000, 10000, 5);
|
2010-01-23 02:13:59 +00:00
|
|
|
|
2010-12-11 00:51:19 +00:00
|
|
|
recordid table_root = ltable->allocTable(xid);
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
Tcommit(xid);
|
|
|
|
|
|
|
|
xid = Tbegin();
|
2010-04-12 20:56:54 +00:00
|
|
|
RegionAllocator * ro_alloc = new RegionAllocator();
|
|
|
|
|
2010-12-11 00:51:19 +00:00
|
|
|
diskTreeComponent::internalNodes::iterator * it = new diskTreeComponent::internalNodes::iterator(xid,ro_alloc, ltable->get_tree_c2()->get_root_rid() );
|
2010-03-05 22:21:44 +00:00
|
|
|
it->close();
|
|
|
|
delete it;
|
2010-04-12 20:56:54 +00:00
|
|
|
delete ro_alloc;
|
2010-01-23 02:13:59 +00:00
|
|
|
Tcommit(xid);
|
2010-12-11 00:51:19 +00:00
|
|
|
delete ltable;
|
2010-04-28 19:21:25 +00:00
|
|
|
logtable<datatuple>::deinit_stasis();
|
2010-01-23 02:13:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|