Commit graph

846 commits

Author SHA1 Message Date
Sears Russell
6a02f2f159 buffer manager implementation is now determined by an overridable factory method 2009-10-05 22:39:09 +00:00
Sears Russell
24650fa190 buffer manager refactoring; started work on new dirty page table writeback interface (to avoid circular dependencies) 2009-10-05 21:19:01 +00:00
Sears Russell
8bf64aed58 fix compiler warning 2009-10-05 20:48:04 +00:00
Sears Russell
0a1ca5e1cc make compilation succeed on macosx; this will still run macs out of disk space. Also, it disables a number of binaries that probably should be supported on macs. 2009-10-02 00:45:10 +00:00
Sears Russell
95d0df4a36 ashok's patch - fix more realloc problems 2009-10-01 02:13:32 +00:00
Sears Russell
4689582cb5 improve log performance by disabling O_SYNC by default (and use fdatasync instead) 2009-09-12 16:20:13 +00:00
Sears Russell
e48bc7adf3 partial b-tree stuff 2009-09-10 21:02:56 +00:00
Sears Russell
6abdb3c1c1 fix deadlock in inMemoryLog 2009-08-31 00:51:45 +00:00
Sears Russell
75ed19556b Disable NAIVE_LOCKING in lhtable. (Should never have been enabled...) 2009-08-27 15:28:01 +00:00
Sears Russell
6562d6dd53 Add parens to comparators in allocationPolicy and dirtyPageTable. 2009-08-23 00:32:50 +00:00
Sears Russell
c4e80b41b5 more include cleaning on alloc, begin cleaning of bufferHash 2009-08-22 21:29:27 +00:00
Sears Russell
1ce1496226 dependency cleanups; removed compenastions from alloc.c 2009-08-22 00:01:02 +00:00
Sears Russell
94c542f8b1 Increase dirtyPageTable concurrency
Add special-casing of lhtable; special case for buffer manager.
2009-08-14 06:31:13 +00:00
Sears Russell
dd0bcae074 add thread synchronization logic to ensure that only one thread is performing writeback at a time. This fixes weird I/O interleavings on some machines 2009-08-13 23:18:49 +00:00
Sears Russell
0154f7d29d IMPORTANT API CHANGE: stasis_dirty_page_table_flush_range() no longer force writes to disk. You now need to call forcePageRange() after flush page range returns.
This commit should significantly improve sequential write thoughput.

I found a segfault bug this morning, but cannot reproduce.  Could be a heisenbug, or could have been a hardware fault (gojira repeatedly kernel paniced, then both problems went away...)
2009-08-13 05:53:48 +00:00
Sears Russell
0cc65aefaf Remove LRU-ordered writeback. Instead, writeback pages sequentially once some fraction of the page file is dirty. Also. further simplifies writeback code. 2009-08-11 17:23:43 +00:00
Sears Russell
0f2b2ff200 remove special write path in deinit. (instead, attempt to avoid random I/O on shutdown) 2009-08-08 16:07:20 +00:00
Sears Russell
a0f9a7bc81 Cleaned up page locking + a harmless memory bug. Add missing locks to page writeback. 2009-08-08 07:59:19 +00:00
Sears Russell
907a24b68e dirty page table flush was pinning pages, then asserting they were not pinned; updated page writeback api to allow correct usage 2009-08-08 01:43:03 +00:00
Sears Russell
c92ee87c32 improved behavior for sequential I/O performance, fixed races during writeback 2009-08-07 18:27:52 +00:00
Sears Russell
68e947fb6d added missing case to allocationPolicy 2009-08-07 17:26:40 +00:00
Sears Russell
a6aa8ed942 added method to access dirtyPageTable 2009-08-05 20:02:33 +00:00
Sears Russell
573cbaa98e implemented missing api calls 2009-08-05 19:56:35 +00:00
Sears Russell
69490f1c98 implement convention that stop=0 means flush to EOF 2009-08-05 19:50:07 +00:00
Sears Russell
16c137aaf7 remove unnecessary checks 2009-08-05 19:48:59 +00:00
Sears Russell
5b10bcc63b Reimplemented allocationPolicy.c; updated API + added more cases to the unit tests. 2009-08-05 06:35:11 +00:00
Sears Russell
c961b34903 forgot to commit b-tree source files 2009-07-29 21:04:08 +00:00
Sears Russell
ebd6b14dbf single-page btrees are working 2009-07-29 21:03:16 +00:00
Sears Russell
0a308f035c more header cleaning; updated INSTALL 2009-07-26 19:47:05 +00:00
Sears Russell
081c61b414 cleaned up includes, autoconf is now optional, since cmake now creates a config.h 2009-07-26 18:51:45 +00:00
Sears Russell
260310e151 Add page ops for tree implementations. 2009-07-26 06:18:54 +00:00
Sears Russell
5ca3a008fa Code / whitespace cleanup (no logic changes) 2009-07-25 23:17:03 +00:00
Sears Russell
8c012bd1c8 Silence extraneous warning, add '--mode -1' to the slotted benchmark (-1 bypasses function dispatch when setting the records) 2009-07-25 23:02:27 +00:00
Sears Russell
7f2edd880d New (more thorough, less frequent) tests for slotted pages. Renamed slotted methods, added microbenchmark for slotted pages. 2009-07-20 17:42:43 +00:00
Sears Russell
9ef3adf40c - Fix compile warning + broken fcn pointer from last commit.
- Address crashes in Tupdate() and recovery caused by mixing segments and page oriented recovery  (add loadPageForOperation() call)
2009-07-16 03:05:32 +00:00
Sears Russell
b44f8b17b3 Add getCachedPage() call. This allows dirtyPageTable to write back pages with out accidentally reading them back in from disk with loadPage(). This should improve performance and allow loadPageOfType() to be used safely. 2009-07-14 07:46:47 +00:00
Sears Russell
4493dbb88b Added support for segment based recovery. For now, Stasis doesn't support hybrid recovery, so mixing page deallocation and segments will make recovery corrupt data / segfault. 2009-07-13 17:18:01 +00:00
Sears Russell
d6c91241d6 fixed bug that caused loadPageOfType to ignore type parameter. Recovery is still broken, since it calls loadPage, even when it can't 2009-07-10 01:19:44 +00:00
Sears Russell
eb0661ceeb added segment.c 2009-07-09 21:09:36 +00:00
Sears Russell
ade1dc896e Add loadPageOfType() call. (Untested for now) 2009-07-07 21:33:49 +00:00
Sears Russell
cf49c7dbf1 forgot to svn rm indirect's files 2009-07-07 20:05:15 +00:00
Sears Russell
397b0fa245 remove indirect page implementation 2009-07-07 20:03:52 +00:00
Sears Russell
2593de7a2c Move page type to Page_s struct. This breaks indirect.c (which is poorly thought out, and will be removed shortly), and was the next step on the road to segment-based recovery 2009-07-07 19:20:22 +00:00
Sears Russell
b66328192c in-memory group by implementation 2009-07-01 01:33:24 +00:00
Sears Russell
09af29abad clean up iterator interface; remove Titerator_releaseLock() 2009-06-28 18:54:57 +00:00
Sears Russell
120665ae53 cleaned up arrayList. stasis_record_write no longer takes an LSN (it was ignoring it anyway). Added some missing calls to stasis_page_lsn_write (each time a page is written to, stasis_page_lsn_write should be called; this happens automatically for operations called via tupdate 2009-06-02 18:25:35 +00:00
Sears Russell
3cc48c4fc4 check for page leaks at shutdown; move myrandom() into check_includes.h, fix a number of page leaks / double frees 2009-05-30 02:23:17 +00:00
Sears Russell
25c6be64b4 add assertunlocked() call 2009-05-30 02:22:04 +00:00
Sears Russell
8a95f5859d fixes Issue 8: When passed a prefix of an existing key, pageOrientedList will no longer treat the prefix and the existing key interchangably 2009-05-21 04:13:50 +00:00
Sears Russell
9de2e515f8 eclipse whitespacifaction 2009-05-21 04:10:41 +00:00
Sears Russell
7db06197ca refactored truncation + dirty page table, fixed doxygen warnings. 2009-05-20 21:23:51 +00:00
Sears Russell
73c4b4fb71 Fix for Issue 1. Reworked log format so that nested top actions do not need to look up old entries during forward operation. This saves log bandwidth and avoids the bug that caused the performance regression 2009-05-14 21:28:09 +00:00
Sears Russell
3ff75ff568 made pass over log documentation 2009-05-13 22:06:58 +00:00
Sears Russell
87218ad929 yet another refactoring; broke groupForce into its own module, removed more static variables and namespace violations 2009-05-13 18:04:53 +00:00
Sears Russell
bc554efc85 renamed some functions to match naming convention 2009-05-08 06:53:30 +00:00
Sears Russell
651a1a22e5 more refactoring; removed static variables from pageHandle.c 2009-05-08 04:56:34 +00:00
Sears Russell
221b2e4acb remove static variables, fix filehandle leak 2009-05-07 09:56:36 +00:00
Sears Russell
7b4cf40221 refactored/created stasis_buffer_manager_open and stasis_handle_open 2009-05-07 08:52:06 +00:00
Sears Russell
b5b414490a fix config.h error for installed copies of stasis 2009-04-29 21:31:39 +00:00
Sears Russell
f947a2b417 add make install target 2009-04-29 20:22:41 +00:00
Sears Russell
55c43358b6 fix recovery bug due to interactions between truncation and the old CLR format. check_faultInjection should now pass. 2009-04-22 22:03:38 +00:00
Sears Russell
731da7456a more eclipse refactoring; cleaned up some names, whitespace and documentation 2009-04-13 22:50:12 +00:00
Sears Russell
7db35ecd39 removed static variables from bufferPool.c; renamed methods, moved Page typedef to common.h 2009-04-13 21:55:08 +00:00
Sears Russell
4b07b538a6 Renamed some methods; fixed bug that caused recovery to create potentially unbounded numbers of concurrent, active transactions.
(Note: this commit contains quite a few instances of auto-cleaned whitespace....)
2009-04-11 17:17:42 +00:00
Sears Russell
dacc33642e silence cast warnings on 32-bit linux 2009-04-09 15:17:38 +00:00
Sears Russell
05077b62fd nested top action cleanup and bugfix; subsequent recovery calls could undo logical undos in some circumstances 2009-04-03 22:01:37 +00:00
Sears Russell
83a982d0bf fail earlier if record_type and record_size apis are abused 2009-04-01 21:12:50 +00:00
Sears Russell
564dfe426b Renamed / refactored operation implementation + registration functions. Added support for third party operations 2009-03-31 05:02:54 +00:00
Sears Russell
83ad15b6d0 more benchmarks; transactions can now be multithreaded 2009-03-20 11:36:27 +00:00
Sears Russell
d413bb27f3 support for lsn-free writeback; partial benchmark code for submission 2009-03-19 03:36:13 +00:00
Sears Russell
b1f44ab005 added simplistic support for log reordering 2009-03-16 08:11:49 +00:00
Sears Russell
45a2410a25 add support for lsn-free set (but not alloc, etc...) 2009-03-15 07:21:37 +00:00
Sears Russell
bd2015443f expose nextAvailableLSN for lsn-free pages 2009-03-15 02:43:09 +00:00
Sears Russell
a69e61ed85 stop checking hash.size, which has changed 2009-03-15 02:11:01 +00:00
Sears Russell
9e54ad60d5 renamed hash() to avoid linker collisions; inlined some hash functions 2009-02-20 23:42:54 +00:00
Sears Russell
4ce4491097 avoid extra calls to gettimeofday() when the log is not durable; set group commit to wait for 10msec, not 100... 2009-02-03 05:36:33 +00:00
Sears Russell
95e9158847 checkin partially implemented log based on file pool so that svn will compile 2009-01-05 21:57:33 +00:00
Sears Russell
93885a3ab4 removed static variables from logWriter.c 2008-12-29 23:05:13 +00:00
Sears Russell
5ba41bb3cb renamed logWriter.[ch] to safeWrites.[ch] 2008-12-29 20:01:37 +00:00
Sears Russell
6f809b00e2 renamed open/deleteLogWriter 2008-12-29 19:46:51 +00:00
Sears Russell
97ab7670db fixes major correctness/performance regression; test for when to force log to maintain WAL was reversed 2008-12-12 00:05:42 +00:00
Sears Russell
32950b2b98 fixed memory leaks and pointer aliasing bugs in lsmTree_iterator. 2008-12-05 00:08:46 +00:00
Sears Russell
32fae6795b Fix memory leak in lruFast.c during Tdeinit(). 2008-12-04 23:07:07 +00:00
Sears Russell
79d1512a5e fixed problem in lsm tree recovery; it was not updating the lsm tree header when passing C1 into C2's merger thread. Then C2 freed C1, and C1 pointed to uninitialized data. 2008-12-04 09:22:17 +00:00
Sears Russell
e4341e10b9 partially fixed rose recovery; clean shutdowns now work 2008-12-04 04:12:47 +00:00
Sears Russell
c6564e67c7 documentation update; eliminated some dead code 2008-12-02 19:39:20 +00:00
Sears Russell
1383a42206 documentation update; made slottedFlush, etc.. static 2008-12-02 19:38:49 +00:00
Sears Russell
78a72d81f3 build readonlyhash; fix compile error from nightly builds 2008-12-02 00:33:45 +00:00
Sears Russell
ddc93caeae do not use group commit with non-durable transactions 2008-12-01 23:22:38 +00:00
Sears Russell
2dcc6598d2 added support for softcommit, and for compile / runtime configuration of stasis log + storefile locations 2008-12-01 22:45:32 +00:00
Sears Russell
17d4bb3ed4 log refactoring 2008-12-01 19:48:59 +00:00
Sears Russell
77b24a991d - Arrange for buffer manager writback to use group commit
- Only call correct log force when log_to_mem is enabled.
2008-12-01 04:28:46 +00:00
Sears Russell
1cddd8ab8c remove ancient obsolete file 2008-12-01 04:24:24 +00:00
Sears Russell
e22c35a1b5 fix lsm iterator data corruption bug 2008-11-26 22:39:48 +00:00
Sears Russell
6a5e7f5589 Fix two problems in lsmTree:
- rewrite lookup() to be simpler, and fixed a few bugs
 - was keeping node records around after pages were released
2008-11-26 07:01:43 +00:00
Sears Russell
15a097a100 sort of compiles under macos now 2008-11-25 01:19:36 +00:00
Sears Russell
11082997d8 revert accidentally committed files 2008-11-24 23:43:26 +00:00
Sears Russell
a321ba6e4e handle null lsmIiterator_ gracefully 2008-11-24 23:41:11 +00:00
Sears Russell
09641257ad fixed memory leak 2008-11-24 07:35:59 +00:00
Sears Russell
2b63991014 preliminary (and largely untested) support for opening LSM-tree iterators starting at a given tuple 2008-11-24 01:32:35 +00:00
Sears Russell
cafd05f9bd moved legacy buffer manager into its own directory 2008-11-13 20:08:37 +00:00
Sears Russell
53a7982f47 fixes numerous blob bugs, allowing linearHashNTA to store arbitrary length key,value pairs. 2008-11-13 04:18:50 +00:00
Sears Russell
46fbfa3c35 Implement blob deallocation; add test case 2008-11-13 00:13:11 +00:00
Sears Russell
e2f604175b move hash iterator code around, update documentation 2008-11-13 00:12:19 +00:00
Sears Russell
f5d1229941 Recovery now maintains XactionTable's state in the same way as forward operation.
Internal transactional2.c state is now declared static.
2008-11-13 00:06:35 +00:00
Sears Russell
9bf242f1a5 Add check for invalid transaction xids to Tupdate(). 2008-11-12 19:00:09 +00:00
Sears Russell
484cd7fd38 fix new gcc compiler warnings 2008-11-11 01:15:25 +00:00
Sears Russell
8b0251ae4b Fix conditional compilation for flex / bison 2008-11-07 08:18:46 +00:00
Sears Russell
fc5b5a2b29 do away with librw 2008-11-07 03:44:41 +00:00
Sears Russell
3c8f2caa10 added more fuse functions 2008-11-06 07:19:14 +00:00
Sears Russell
b01a053664 conditional compilation for fuse stuff; added readOnlyHash to cmake (and fixed automake build problem) 2008-11-05 22:33:09 +00:00
Sears Russell
c51c51dc13 Enable building fuse by default 2008-11-05 22:24:13 +00:00
Sears Russell
00f5037f79 first cut at fuse filesystem; files > 4K do not work yet; nor do deletion, and other things. 2008-11-05 22:18:11 +00:00
Sears Russell
2c2c603dd2 all naive linear hash methods now start with TnaiveHash; removed references to ThashAlloc from documentation 2008-11-03 21:42:42 +00:00
Sears Russell
3c4c4f0916 Initial import of stiki, the STasis wIKI. 2008-10-28 04:34:05 +00:00
Sears Russell
5c5b6d0c67 allow callers to truncateNow() to (safely) override normal truncation policy 2008-10-27 23:24:21 +00:00
Sears Russell
23548354a4 fixes over-zealous assert due to partial log read 2008-10-27 23:22:38 +00:00
Sears Russell
71cc9d6df7 transactions now can check with allocation policy before allocating to pages of their own choosing 2008-10-27 23:20:31 +00:00
Sears Russell
fa18df2424 ignore size field of hashHeader argument 2008-10-23 20:27:55 +00:00
Sears Russell
c76f22fd4f reduce the risk that broken calls to Tset() will create unrecoverable logs 2008-10-23 20:27:08 +00:00
Sears Russell
db4f26b48c Fix crash in recovery; 'initted' was false during undo. undo calls Tupdate(), which checks the status of 'initted' 2008-10-23 19:56:21 +00:00
Sears Russell
0940c59d96 fail fast if Tbegin() called before Tinit() 2008-10-22 21:05:49 +00:00
Sears Russell
6f717c351a update comment 2008-10-22 21:05:12 +00:00
Sears Russell
edb51e5789 Fix buffer manager page leak. 2008-10-09 20:14:55 +00:00
Sears Russell
97dfdb8f95 Fix conditional compilation for libcheck and libconfuse 2008-10-09 18:59:45 +00:00
Sears Russell
ad65a806a5 removed old #include 2008-10-07 19:19:58 +00:00
Sears Russell
474cabdb99 removed workaround code for old arraylist bug 2008-10-04 16:09:34 +00:00
Sears Russell
82ec112788 Fixed overly specific assertion. 2008-10-04 15:53:19 +00:00
Sears Russell
a6a83b98a1 Removed handling/warning related to old kludge. 2008-10-04 07:27:53 +00:00
Sears Russell
a20d28d369 removed dead code; added additional check for TpagedListInsert() 2008-10-04 07:18:25 +00:00
Sears Russell
132a567533 removed dead/unnecessary code; private methods are now static 2008-10-04 07:08:35 +00:00
Sears Russell
d43e64a41f remove bTree stuff from build systems 2008-10-04 01:35:56 +00:00
Sears Russell
ef487c4dc8 remove btree stub files 2008-10-04 00:53:11 +00:00
Sears Russell
6354fe8a2f use pageid instead of int; Tupdate now takes a pageid instead of a recordid 2008-10-03 02:42:25 +00:00
Sears Russell
18fd6009fe cosmetic change 2008-10-02 20:40:43 +00:00
Sears Russell
220c33cc31 Fixed two buffer manager performance problems (Markos, Vinayak, thanks for pointing these out!):
- No longer hold global mutex during page writeback
 
 - Don't reserve 90% of the buffer pool for the free list.  Now the freelist reserves 1% of the buffer pool + 6 pages, and expands if it runs out of space.
2008-10-01 20:43:58 +00:00
Sears Russell
65a3c94421 Fix libdfa warnings, add libdfa to CMake. 2008-10-01 20:03:15 +00:00
Sears Russell
348783398a port pobj to c99, add to build system 2008-10-01 20:02:09 +00:00
Sears Russell
ff5ef752f3 fix compiler warning 2008-10-01 15:50:24 +00:00
Sears Russell
db1d79efcd Removed Tinstant* and broken logical hash stuff 2008-09-30 15:34:42 +00:00
Sears Russell
5dcf3bd1a4 check_bufferManager should pass now(!!!) bufferManager was crashing with "assert(victim)
failed" if the application pinned so many pages that the writeback tasks could not write back 
pages in order to maintain the free page list.

 - Instead of crashing, issue warning the first time this happens.

 - Add diagnostic message explaining that all pages have been pinned before crashing 
   due to a failed loadPage() request.
2008-09-29 04:35:08 +00:00
Sears Russell
a7e8751f2f Remove hardcoded path from parser; tell automake not to bother with swig or parser 2008-09-28 07:35:20 +00:00
Sears Russell
e96b4d1c05 check in lex/yacc based relational algebra primitives 2008-09-28 06:39:45 +00:00
Sears Russell
ff0887624c Simplified the page locking conventions.
Added paranoid calls to assertlock() to page.c

Fixed race in abort():

 - pick CLR LSN

 - release page lock

 - someone else updates page

 - lock page

 - apply undo
2008-09-28 05:50:59 +00:00
Sears Russell
6d17442380 Major refactoring:
- Changed operations to take only two arguments
     - No more hacks regarding log argument sizes

     - Set pageid = INVALID_PAGE if you want a logical operation

  - Ported operation implementations to new api; exposed + fixed a number of concurrency bugs

  - More fixes to prepare

  - Fixed to nested top actions

  - More coherent operations api / recovery implmentation

  - TnaiveHash* and Tinstant* are (and were already) broken, and are set for removal

  - Removed some instances of fail_unless

  - Fixed design flaws in blob implementation.

  - New naming convention for operation callback functions.
2008-09-28 03:11:24 +00:00
Sears Russell
7867100b8b change default io handle to pfile (was non_blocking) 2008-09-28 01:44:18 +00:00
Sears Russell
b6c3f60126 removed unneccessary local variable 2008-09-28 01:02:36 +00:00
Sears Russell
7e54d72f18 fixed compilation warning 2008-09-28 01:01:38 +00:00
Sears Russell
41cd975e91 fixed new const warnings from gcc 2008-09-24 06:40:34 +00:00
Sears Russell
944c7e984f fixes / cleanups of Tprepare() 2008-09-24 03:08:32 +00:00
Sears Russell
fb4e91debe removed deferred operation stubs 2008-09-12 23:08:41 +00:00
Sears Russell
75419290c4 Added asserts to help narrow down unit test failures 2008-09-12 22:55:23 +00:00
Sears Russell
e6ec2cb9fc Added "loadUninitializedPage()", which returns an uninitialized page instead of reading preimages from disk. 2008-06-09 01:13:02 +00:00
Sears Russell
2863487991 Documentation update; added more sections under modules, reduced amount of cruft generated by doxygen. 2008-04-23 01:41:57 +00:00
Sears Russell
2929394b31 Fixed some documentation warnings, and clarified a few points. 2008-04-17 06:29:34 +00:00
Sears Russell
afbd89e3ff All headers now live in the header directory. (stasis/, not src/stasis) 2008-04-13 04:02:57 +00:00
Sears Russell
b1bfe7979f Questionable attempts to appease valgrind. 2008-03-14 03:09:29 +00:00
Sears Russell
3b70dfaab7 nearly ready to run experiments... 2008-03-14 03:06:52 +00:00
Sears Russell
0c7d45f788 Added support for tombstones and rudimentary versioning.
workload 2 is broken at the moment.
2008-03-13 01:16:37 +00:00
Sears Russell
fbf5544853 Chose more appropriate data sizes. 2008-03-13 01:13:52 +00:00
Sears Russell
5ea1f630d7 Fixed memory leaks. 2008-03-11 23:17:15 +00:00
Sears Russell
474670092e Fixed exceptional value handling. 2008-03-11 08:47:12 +00:00
Sears Russell
0f27d30d22 Fixed overrun handling (nop wasn't using it; the multicolumn page implementations were broken...)
Updated for to use 8 bit deltas (nop provides alternative to 16 bit deltas in many cases...)
2008-03-10 08:19:23 +00:00
Sears Russell
893c1afee9 Added "no-op" compressor (to allow compression to be disabled...) 2008-03-08 07:43:53 +00:00
Sears Russell
e8490c8b8a Fixed compiler warnings 2008-03-08 07:36:47 +00:00
Sears Russell
567c2b51b9 Fixed bug in recordFind. It was finding values outside of the requested range. 2008-03-08 07:33:44 +00:00
Sears Russell
50c5123548 Added new dynamic version of multicolumn, and pagelayouts, etc to support it. 2008-03-08 03:16:08 +00:00
Sears Russell
922669bde4 fix compiler warning 2008-03-08 03:04:16 +00:00
Sears Russell
8da9a5e8ad Added "interests" to survey. 2008-03-05 20:21:06 +00:00
Sears Russell
c5a75a9102 Fixed some parsing / tokenization problems (added support for more characters / whitespace within tuples.
Implemented perl driver (and sample .cgi) for toplevel.c's network server.
2008-03-05 02:31:58 +00:00
Sears Russell
54055cd3e7 Initial checkin of relational algebra implementation. 2008-03-02 23:43:38 +00:00
Sears Russell
034343737b Preliminary cmake build system (just enough for unit testing; misses lots of old code and benchmarks...) 2008-03-02 23:25:31 +00:00
Sears Russell
e49d51cb7e Clean up includes for new cmake build system. 2008-03-02 23:21:39 +00:00
Sears Russell
3b74523a53 Fix memory leak. 2008-03-01 20:40:31 +00:00
Sears Russell
4104de06ff fixed double free (was freeing iterator in next() and close()...) 2008-03-01 20:30:48 +00:00
Sears Russell
146563ca45 Allow third parties to register new iterator types. (made iterator registration non-static; moved constants into constants.h) 2008-03-01 19:34:12 +00:00
Sears Russell
f05b0233a3 Fixed memory leaks on iterator open/close Also zero out some memory defensively. 2008-03-01 19:32:34 +00:00
Sears Russell
4c83e1c373 Fixed memory leak during analysis phase. 2008-03-01 19:27:31 +00:00
Sears Russell
673f6b55d3 Allocation bugfixes 2008-02-29 18:03:32 +00:00
Sears Russell
043b9a7a01 Regions are 1 offset;iterator was totally broken. 2008-02-20 22:56:52 +00:00
Sears Russell
17d4f95d03 Fix bookkeeping, get rid of aborts during recovery of partially flushed log. 2008-02-20 22:51:52 +00:00
Sears Russell
a823255227 Added interface to let other stasis modules find regions' boundary tags 2008-02-19 22:07:13 +00:00
Sears Russell
1846340251 Zero out memory at initilization 2008-02-19 21:29:46 +00:00
Sears Russell
175b7e281e Zero out memory and dirty bit at initialization. 2008-02-19 21:27:34 +00:00
Sears Russell
19949af99d More sanity checking. 2008-02-19 21:26:31 +00:00
Sears Russell
178ef7dc47 Fixes errors/warnings revealed by 32-bit x86. 2007-12-19 03:23:31 +00:00
Sears Russell
71451f0c93 Bugfixes for experimental repeatability 2007-12-14 19:08:09 +00:00
Sears Russell
ab4fb0df6c Fix linker namespace collision with libz 2007-12-06 21:52:37 +00:00
Sears Russell
5d62e0c0df Filled in paper info about the data set; minor tweaks to R setting code. 2007-11-15 16:57:25 +00:00
Sears Russell
2bb6fce574 Code is ready(?) for experiments (version before this was solid despite (now) known bugs; I saw some crashes with these diffs, but think they've all been
addressed.)
2007-11-15 01:33:39 +00:00
Sears Russell
58e0466339 roseTable csv parser. updated rose.cpp for benchmarking 2007-11-13 23:40:21 +00:00
Sears Russell
5ad137164f Fixed compiler warnings. 2007-11-12 16:40:50 +00:00
Sears Russell
5384d1efc5 indirect.c creates a scratch page with malloc. It wasn't setting the scratch page's type to UNINITIALIZED_PAGE, leading to segfaults. 2007-11-12 16:32:00 +00:00
Sears Russell
799c7498cd Essentially leak free (mem and disk) after a few hours of roseTable 2007-11-12 07:27:49 +00:00
Sears Russell
ecc2392066 No (?) significant disk space leaks. 2007-11-12 01:40:12 +00:00
Sears Russell
9bb6984c23 force_range is now being called after compressData() 2007-11-12 00:49:00 +00:00
Sears Russell
f51148e686 More fixes for machines without file_sync_range 2007-11-11 23:38:10 +00:00
Sears Russell
863586135e Fixed compilation for machines without sync_file_range() 2007-11-11 23:33:23 +00:00
Sears Russell
87a70f29bc Preliminary force_range implementation; lsmTable leaks significantly less space now. 2007-11-11 23:22:21 +00:00
Sears Russell
07a6cd29e3 Forgot ; new abort() statement... 2007-11-11 17:24:44 +00:00
Sears Russell
48cdffe4d4 Stopgap (inefficient, but possibly correct) fix for the arraylist kludgieness. 2007-11-11 17:18:57 +00:00
Sears Russell
c34617fa16 Got versioning iterator to work. 2007-11-11 00:46:10 +00:00
Sears Russell
f2df518338 Implemented TlsmTableFind(); fixed quite a few bugs in merge, comparators, etc... 2007-11-06 02:27:04 +00:00
Sears Russell
d03a4e0c1f Static dispatch, multiple column types per page. 2007-11-04 21:25:08 +00:00
Sears Russell
e46dcce461 No more leaks; "fixed" RB tree memory usage estimates. 2007-11-04 01:51:37 +00:00
Sears Russell
5a6ba6ed94 Fixed memory leak. 2007-11-03 22:21:46 +00:00
Sears Russell
3a88e43e9b Fixed statistics reporting. 2007-11-02 21:56:17 +00:00
Sears Russell
75cbb20e6d Tuple insertion now works (modulo storage leakage, hard coded tree sizes (not even ratios), and many other problems...) 2007-11-02 21:20:30 +00:00
Sears Russell
f101919244 LSM table is now able to spawn threads, then exit. 2007-11-02 15:00:47 +00:00
Sears Russell
7e2c37534e Partial implementation of a collection oriented interface for ROSE. (Checking in to create version to diff against.) 2007-11-01 20:09:55 +00:00
Sears Russell
2c25c3a393 Statically typed tuples. 2007-10-30 23:32:37 +00:00
Sears Russell
b167b98085 * Remove spurious warnings messages from tests that intentionally crash stasis.
* Move and rename lladd_autoTruncation flag to stasis_truncation_automatic in flags.c
2007-10-23 23:16:58 +00:00
Sears Russell
9b8fefe68d Added force() to the handle API. It is now called from tests, and by the buffer manager 2007-10-23 01:51:03 +00:00
Sears Russell
d7e56fc96f Added more buffer manager flags (allow programs to bypass non_blocking). 2007-10-22 20:50:00 +00:00
Sears Russell
44a766a7f6 * Fixed a race condition. Pages that were merged during writeback were
set clean and unpinned while the slow handle was writing them back.
This allowed other threads to come in, and read the old version of the
page from disk.

* Fixed performance bug: When considering pages for writeback, start
  after the end of the last flushed page (not the first flushed page)

* Honor "max_fast_handles".
2007-10-22 20:45:48 +00:00
Sears Russell
1c408dd2f1 Initial refactoring of rose.cpp into reusable components. (Just shuffles the code around.) 2007-10-18 18:52:12 +00:00
Sears Russell
cd5ec5f70c Initial ROSE check in. 2007-10-15 17:46:44 +00:00
Sears Russell
0239743b03 More updates to svn:ignore (and removing .deps directory that doesn't belong in svn...) 2007-10-03 01:59:21 +00:00
Sears Russell
22c89bb3fe Renamed physical_slot_length 2007-10-03 01:53:51 +00:00
Sears Russell
7fb4fd4c1a Updated svn:ignore. 2007-10-03 01:52:41 +00:00
Sears Russell
c9bbf3af94 Converted page.h to follow new naming convention; documented new page api; begun stasis documentation cleanup. 2007-10-02 00:18:33 +00:00
Sears Russell
5f954eb239 Final commit from google. 2007-08-24 23:01:08 +00:00
Sears Russell
5bd2138a8b Fixes a number of memory leaks; adds pageCleanup() callback, and allows callers to use custom allocators with LSM trees 2007-08-20 21:58:20 +00:00
Sears Russell
9c1c284406 Implemented range scans; lsmTree now supports keys that are stored as fixed length byte arrays. 2007-08-20 16:53:16 +00:00
Sears Russell
519bd515f4 New access method for the buffer manager; write coalescing; runtime bufferManager selection and a few bufferManager bugfixes. 2007-08-20 16:25:08 +00:00
Sears Russell
90f011b049 New access method for the buffer manager; write coalescing; runtime bufferManager selection and a few bufferManager bugfixes. 2007-08-20 16:23:57 +00:00
Sears Russell
8963d6d381 Fixed recordNext(), add unit test for recordNext() on slotted and fixed pages. 2007-08-20 16:04:44 +00:00
Sears Russell
8367dfe9a3 releasePage() is now a function, not a function pointer. releasePageImpl is the name of the new function pointer. 2007-08-14 01:20:08 +00:00
Sears Russell
9745d62887 Preliminary LSM tree implementation (hardcodes keys as ints for now) 2007-08-14 01:17:31 +00:00
Sears Russell
a773c4d8b7 Bugfixes and improved error handling for recovery tests and registerPageType() 2007-07-19 23:47:06 +00:00
Sears Russell
f539011e9f Implemented simulateBufferManagerCrash. 2007-07-19 16:36:17 +00:00
Sears Russell
3d84412cea It is now possible to register page types before Tinit() is called, so that they may be used by recovery. 2007-07-19 16:35:11 +00:00
Sears Russell
7ca0619db0 Adds a void * to Page_s so that page implementations can store information with the pages they manage. 2007-07-18 20:10:10 +00:00
Sears Russell
9fd91cffb8 Updated page api to handle page types that need to grab resources on record read/ write, or that perform callbacks when read / written to disk. 2007-07-18 20:09:14 +00:00
Sears Russell
356387eafe support "make install", and use libtool to generate .so, .a files. 2007-06-25 15:47:28 +00:00
no author
d0274c3304 Renamed 'lladd' directories and python module to 'stasis' 2007-06-11 21:36:57 +00:00
Sears Russell
4998e57566 Updated for the new page API 2007-06-07 21:53:09 +00:00
Sears Russell
2f7da41663 Whitespace; restoring lost call to checkRid 2007-06-01 22:20:25 +00:00
Sears Russell
5e1445777f Should have gone in with the rest of the nowarn patch 2007-06-01 22:16:42 +00:00
Sears Russell
dd7c6b857d Added assertlock() and call it when page implementations assume a page has already been latched. (Fixed
associated bugs as well)
2007-06-01 21:32:33 +00:00
Sears Russell
d1aeba8a82 Cleaned up obsolete @todo's; fixed inconsistent page file initialization 2007-06-01 21:06:18 +00:00
Sears Russell
951a897040 Add casts to prevent warnings on (upcoming changes to) recordRead, recordWrite 2007-05-31 22:40:19 +00:00
Sears Russell
bff22716a7 Updated page.h's interface to make it more consistent. 2007-05-31 01:15:12 +00:00
Mark Callaghan
12c7f6a1c5 Simple SWIG interface 2007-05-30 23:48:36 +00:00
Sears Russell
a3885944a0 Messed with documentation to try to make doxygen happy and more likely to see this file. 2007-05-26 01:03:57 +00:00
Sears Russell
22dfd5a117 Fixed use after free. 2007-04-21 07:51:33 +00:00
Sears Russell
05ad97b37b Was releasing log_read_mutex without obtaining it first... 2007-04-20 07:13:18 +00:00
Sears Russell
362b1036de Changed CLR log format so that it is identical to update entries. The old format pointed back to an earlier
entry in the log, complicating truncation significantly.  The new format copies log entries into their CLRs,
and is somewhat redundant, as redo and undo information is stored in the CLR, but the undo information will
never be used...
2007-04-03 09:18:45 +00:00
Sears Russell
4f47613fe5 Fixed typo (print -> printf) 2007-03-30 09:20:03 +00:00
Sears Russell
8275eb71be Cleanup and refactoring for deferred updates. CLR's were broken; Tdefer requires them, so it is
only partially implemented.
2007-03-30 09:16:21 +00:00
Sears Russell
06de4dca0a Readability cleanups; fixed debug message. 2007-03-30 07:41:31 +00:00
Sears Russell
4c8466555c Cleaned up Tupdate() by adding TupdateRaw(); removed *_RAW and updated linear hash accordingly. 2007-03-28 09:21:07 +00:00
Sears Russell
cd352a6341 Removed out-of-date comments. 2007-03-19 21:55:47 +00:00
Sears Russell
6b60c10864 include config.h for 64-bit file support on 32-bit architectures 2007-03-13 09:19:32 +00:00
Sears Russell
d05cdfd357 Fixes compilation warning. 2007-03-13 08:53:54 +00:00
Sears Russell
4e6330492c Adaptor between the pageFile interface and stasis_handle_t 2007-03-13 08:40:31 +00:00
Sears Russell
6e749b93a4 bufferHash now seems to be correct, and makes use of the stasis_handle_t
interface.
2007-03-13 08:39:29 +00:00
Sears Russell
2e0ad972fd Bugfix. (lru->remove() wasn't removing node mapping.) 2007-03-13 08:32:04 +00:00
Sears Russell
11da78e46b Port for compatiblity with new API. 2007-03-13 08:31:15 +00:00
Sears Russell
2c6e674ab3 Streamlined bufferHash implementation, with new test-cases. 2007-03-11 07:55:00 +00:00
Sears Russell
17845a59ed A O(1) lru implementation. 2007-03-11 07:45:17 +00:00
Sears Russell
8145e8db6f A doubly linked list implementation. All operations are O(1), including the ability to remove things from
within the list, assuming you already have an appropriate pointer to it.
2007-03-11 07:37:20 +00:00
Sears Russell
15e77da1d4 more tests / bugfixes for buffermanager. 2007-03-10 01:29:43 +00:00
Sears Russell
d88aef1520 Replacement policy for new buffer manager 2007-03-08 07:58:24 +00:00
Sears Russell
61249c29a7 New "default" buffer manager that aims to replace the current one, but
without deadlocks.  Still need to track down a memory corruption bug
that this introduces, or exercises.
2007-03-08 07:56:53 +00:00
Sears Russell
5972fcc549 Sets p->dirty and p->LSN appropriately; checks their consistency. 2007-03-08 07:44:13 +00:00
Sears Russell
918fb9d375 Adds consistency checking for page lsn's. 2007-03-08 07:39:22 +00:00
Sears Russell
76cd6b5114 Added tryreadlock() and trywritelock(). 2007-03-08 07:36:02 +00:00
Sears Russell
8f3d503ea8 Added TdurabilityLevel().
Test cases now pass with LOG_TO_MEMORY and BUFFER_MANAGER_MEM_ARRAY
2007-03-07 06:45:28 +00:00
Sears Russell
237bbe0fbe Added ability to override default bufferManager implementation with
-DUSE_BUFFER_MANAGER
2007-03-06 00:00:26 +00:00
Sears Russell
44aef7e8ea Added ability to override default logging implementation with
-DUSE_LOGGER
2007-03-05 23:56:38 +00:00
Sears Russell
8c633f633e un-dirty pages during releasePage 2007-03-04 02:52:31 +00:00
Sears Russell
c1bf2ba7ac New buffer manager implementation (very simple; just stores pages in memory, addressed via an array of pointers) 2007-03-04 02:46:23 +00:00
Sears Russell
e49e8c004e dirtyPages_deinit was broken. (Was excercised by new pageArray bufferManager...) 2007-03-04 02:44:19 +00:00
Sears Russell
5650953c4f Added .cvsignore files. 2007-03-04 00:40:15 +00:00
Sears Russell
26e5aa3069 truncation.c no longer includes on pageFile.h 2007-03-04 00:36:45 +00:00
Sears Russell
2d3fc4ba47 Changed malloc() to calloc() to prevent unpacked structs from leaking
bytes to log
2007-03-03 23:24:00 +00:00
Sears Russell
ca57875007 Fixed TisActiveTransaction, cleaned up Tinit(), Tdeinit(). 2007-03-03 22:51:07 +00:00
Sears Russell
078b45dbcc Removed and/or flagged #include dependencies on pageFile.h (in the process of further factoring bufferManager implementation out of Stasis.) 2007-03-03 02:26:17 +00:00
Sears Russell
73788eb910 Reworked intialization code, includes to isolate bufferManager
implementation from the rest of Stasis.
2007-03-03 01:52:03 +00:00
Sears Russell
b3152261b4 Xid -1 leads to illegal memory accesses. Added checks for it; fixed
problematic unit test.
2007-03-03 01:48:58 +00:00
Sears Russell
86a6c3ff77 Removed comment that warns about a solved problem 2007-03-03 01:46:44 +00:00
Sears Russell
006cd1e621 Moved roundUp/Down to 'static inline' in header; completed unit test's checks. 2007-02-12 07:54:32 +00:00
Sears Russell
4ae4ad54d7 deleted dead code / unnecessary comments. 2007-02-07 03:06:35 +00:00
Sears Russell
d2d631ff30 Rewrote pinnedRanges. 2007-02-07 03:04:19 +00:00
Sears Russell
fe30fbbd74 RangeTracker seems to be working; still need to write unit tests for its return value. 2007-02-06 02:32:01 +00:00
Sears Russell
3b1135ea2f Miscellaneous cleanups, slightly more conservative latching. 2007-01-30 18:26:59 +00:00
Sears Russell
99bcf8acd9 Randomized test; bugfixes 2007-01-25 22:38:22 +00:00
Sears Russell
05275bbe5a Tracks ranges in O(m log n) time. 2007-01-24 18:25:38 +00:00
Sears Russell
c2fa9913b1 Added partial implementation of range tracking for pinning arbitrary
regions.  Currently, tracks regions, and is O(m log(n)) for each
operation, where m is the number of transition points per range, and n
is the number of transition points in the system.  A transition point is
a place in memory where the pincount changes.
2007-01-24 01:03:52 +00:00
Sears Russell
f6ccaadc35 Updated slotted api to match fixed api; cleaned up dead code. 2007-01-22 20:55:25 +00:00
Sears Russell
9b49787931 typo in getSetRaw() 2007-01-22 20:54:04 +00:00
Sears Russell
346fe97161 Fixed race (wasn't grabbing lock); typo in getInstantSet 2007-01-22 20:53:26 +00:00
Sears Russell
3aa83e7a48 Added link to test.c from main API page, and doxygenified the test.c comments. 2006-12-18 01:12:30 +00:00
Eric Brewer
fcb0a33da9 New directory for testing application code 2006-12-18 00:48:18 +00:00
Sears Russell
5b56370980 Fixed append. (It wasn't calling updateEOF, as it should have been. Also, updateEOF assumed start_pos was zero) 2006-11-22 05:04:48 +00:00
Sears Russell
802eeb33e7 New non-blocking implementation, with backpressure. Still doesn't handle overlapping writes. (Multiple writes to the same region is OK though.) 2006-11-21 06:50:12 +00:00
Sears Russell
1dbf1145ca Update to detect changes in file size (to support multiple file handles...) 2006-11-21 06:47:35 +00:00
Sears Russell
b8d0ccce79 Modularized the build; made berkeleydb and confuse optional. No longer build as many things by default. 2006-11-09 23:00:50 +00:00
Sears Russell
9294f89277 Fix for fallback posix_memalign implementation. (Inserted missing
casts)
2006-11-08 07:22:42 +00:00