Commit graph

184 commits

Author SHA1 Message Date
Sears Russell
c7fa929e71 This fixes in Stasis issue 22.
Replacement policies now track the pin count of each page that they interact with.  This behavior used to live in bufferHash, and had never been ported to concurrentBufferManager.

For various reasons, the pin counts have to be updated atomically with the LRU state.  This would be very difficult to do inside of concurrentBufferManager, which sometimes needs to add and remove pages to replacement policies without holding any other latches.
2010-04-20 01:09:32 +00:00
Sears Russell
5138af6d1c leave 2 pages in reserve for stale pin test (as opposed to one) 2010-04-19 23:09:30 +00:00
Sears Russell
7c5eb2a7e9 added dup method to io handles 2010-04-08 23:50:01 +00:00
Sears Russell
d281282533 fix concurrentWrapper so that it implements the same api as the other replacement policies (it used to livelock when no pages were available. It now returns null). 2010-03-31 22:37:42 +00:00
Sears Russell
3c27ed566e add prefetch primitives 2010-03-29 22:29:30 +00:00
Sears Russell
5ffd1110e9 Added concept of "transaction fingerprints"
The region allocator marks freed regions "Condemned" before actually freeing them.  Condemned regions are associated 
with a transaction; before they can be reused / coalesced the transaction that condemned them must complete.

The region allocator used "TisActiveTransaction(xid)" to determine whether a given transaction had completed.  The 
problem is that Stasis now reuses transaction id's, and condemned regions were never reclaimed in practice.  A transaction
fingerprint is a unique identifier (currently transaction id, rec_lsn) that can be used to distinguish transactions that
did not execute concurrently.

I considered an alternative design based upon end-of-transaction actions.  This would have worked as well, but would 
have been a more invasive change.
2010-02-18 19:12:46 +00:00
Sears Russell
4e100479d1 Add TarrayListDealloc() to arrayList. Remove one region allocation from each array list alloc. Add unit test for dealloc.
Also, removed some old compensations cruft.
2010-02-18 04:12:39 +00:00
Sears Russell
98e0cb1fab implement TregionSize(), add TregionForce() 2010-02-12 16:44:28 +00:00
Sears Russell
180fb12859 unit test for bug 22 2010-02-11 22:19:03 +00:00
Sears Russell
903728c589 shorten dirtyPageTable test. 2010-01-22 23:39:42 +00:00
Sears Russell
3849b5f131 silence compiler warnings 2010-01-22 19:09:58 +00:00
Sears Russell
49979ffa52 unit test for libredblack 2010-01-21 23:48:43 +00:00
Sears Russell
17ac09c652 fix deadlock in check_multiplexer. 2010-01-21 21:53:18 +00:00
Sears Russell
9dba8770f0 test TsoftCommit(); make sure it works when TforceCommits() is called, and when Tdeinit() is called 2010-01-21 18:57:58 +00:00
Sears Russell
9f0886a565 fix typo that disabled the new tests 2010-01-21 18:40:28 +00:00
Sears Russell
f2ee7b6573 fix bug exposed by new group commit behavior; nextUnstableLSN was returning the offset of the beginning of the CRC entry, not the end of it. This was causing an assertion to fail. 2010-01-21 18:28:34 +00:00
Sears Russell
250223086c reordered includes for compatibility with gcc3 2010-01-21 00:03:17 +00:00
Sears Russell
b1f7d1947a more log refactoring. safeWrites now holds a latch across reserve_entry, write_entry, and write_entry_done 2010-01-19 02:14:09 +00:00
Sears Russell
022136d3c3 move inMemoryLog, to the new api 2010-01-11 22:55:55 +00:00
Sears Russell
d71e248291 removed freeLogEntry 2010-01-11 20:41:59 +00:00
Sears Russell
f3d06543e5 silence spammy debugging messages; clean up check_io test case implementation a bit 2010-01-06 23:44:07 +00:00
Sears Russell
1af589dd18 remove malloc and memcpy from the in_memory_log read path 2009-12-31 23:25:56 +00:00
Sears Russell
1409a9eb27 more refactoring; log handles now manage their log entries memory 2009-12-31 23:01:37 +00:00
Sears Russell
a5788688c8 refactor getUpdateArgs; remove a bunch of casts, fix a bunch of warnings 2009-12-31 20:20:47 +00:00
Sears Russell
9aa1d9d652 pull memcpy out of allocUpdateEntry() 2009-12-31 19:30:40 +00:00
Sears Russell
2ff421bff0 initial opensolaris port 2009-11-29 03:22:36 +00:00
Sears Russell
675bdce24a wrote some wrappers that emulate redblack; default to stl tree for now 2009-11-24 00:24:18 +00:00
Sears Russell
07053987ef speed up test a bit 2009-11-09 22:58:55 +00:00
Sears Russell
8bd0616f97 new concurrent buffer manager 2009-11-09 19:50:00 +00:00
Sears Russell
f5e3ab2d91 concurrent hashtable seems to be working; still need to work out atomicity primitives (eg; options to leave the bucket locked on success) 2009-10-19 21:55:25 +00:00
Sears Russell
1cf16f62f2 add optional support for gcc atomics to transaction table 2009-10-15 22:46:25 +00:00
Sears Russell
5df5512d91 fixed unit test bug; logWriters may now return NULL when readers attempt to read before the beginning of the log 2009-10-15 18:48:58 +00:00
Sears Russell
4b2cfb2b23 fix latching bug in unit test 2009-10-15 17:45:43 +00:00
Sears Russell
331f680c09 partial rewrite of transaction table to reduce thread contention 2009-10-15 02:33:08 +00:00
Sears Russell
4565aff9de more refactoring; no more globals in transactionTable.c 2009-10-14 21:22:50 +00:00
Sears Russell
20a3fe9df5 add support for soft commits, and making prior soft commits durable 2009-10-12 19:16:41 +00:00
Sears Russell
942ba7fffc bugfixes + support for hard limits on log size 2009-10-08 22:48:58 +00:00
Sears Russell
6a02f2f159 buffer manager implementation is now determined by an overridable factory method 2009-10-05 22:39:09 +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
4689582cb5 improve log performance by disabling O_SYNC by default (and use fdatasync instead) 2009-09-12 16:20:13 +00:00
Sears Russell
1ce1496226 dependency cleanups; removed compenastions from alloc.c 2009-08-22 00:01:02 +00:00
Sears Russell
3760fd1fea Add missing page lock acquisition to unit test. 2009-08-08 07:52:02 +00:00
Sears Russell
4d2e70f9f3 Set appropriate timeout. 2009-08-08 07:50:06 +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
3243396cb4 add dirtyPageTable unit test 2009-08-05 19:51:46 +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
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
260310e151 Add page ops for tree implementations. 2009-07-26 06:18:54 +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
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
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
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
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
7db06197ca refactored truncation + dirty page table, fixed doxygen warnings. 2009-05-20 21:23:51 +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
7b4cf40221 refactored/created stasis_buffer_manager_open and stasis_handle_open 2009-05-07 08:52:06 +00:00
Sears Russell
b2ff81fc8e build / test fault_injection by default 2009-04-21 19:03:50 +00:00
Ashok Sudarsanam
2533dd921b fault injection tool for stasis 2009-04-21 18:34:46 +00:00
Sears Russell
434a5fdb55 build unit tests even if check is not installed 2009-04-18 04:57:07 +00:00
Sears Russell
02469fb735 remove dependency on the check unit test suite 2009-04-14 21:55:47 +00:00
Sears Russell
5bb8dbc2b9 centralized #include <check.h>, removed obsolete (uncompiled) unit test. 2009-04-14 20:21:05 +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
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
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
1a1268ac36 re-enable majority of linearHashNTA tests. (Ooops!) 2009-03-15 02:42:00 +00:00
Sears Russell
2ecc822561 more iterator tests 2009-03-15 02:14:03 +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
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
53a7982f47 fixes numerous blob bugs, allowing linearHashNTA to store arbitrary length key,value pairs. 2008-11-13 04:18:50 +00:00
Sears Russell
e842987915 check that TrecordSize() works for blobs. 2008-11-13 04:17:59 +00:00
Sears Russell
46fbfa3c35 Implement blob deallocation; add test case 2008-11-13 00:13:11 +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
484cd7fd38 fix new gcc compiler warnings 2008-11-11 01:15:25 +00:00
Sears Russell
fc5b5a2b29 do away with librw 2008-11-07 03:44:41 +00:00
Sears Russell
c7c729acfa Fix typo in last commit 2008-11-03 21:51:23 +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
a20d28d369 removed dead code; added additional check for TpagedListInsert() 2008-10-04 07:18:25 +00:00
Sears Russell
42d779838e Check TarrayListLength() 2008-10-04 07:01:38 +00:00
Sears Russell
35216c4ee4 check ring buffer error handling, deallocation 2008-10-04 01:39:23 +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
c0f7336772 fixed broken test cases 2008-10-03 02:41:14 +00:00
Sears Russell
545fe27019 increased test timeout 2008-10-01 17:59:16 +00:00
Sears Russell
4afe95cda7 unit test was setting page lsns to invalid values, breaking truncation 2008-10-01 15:57:29 +00:00
Sears Russell
defbcbfde1 Fixed bug in check_bufferManager.c. It wasn't marking pages dirty or setting LSN's. 2008-09-30 17:49:39 +00:00
Sears Russell
db1d79efcd Removed Tinstant* and broken logical hash stuff 2008-09-30 15:34:42 +00:00
Sears Russell
b91050755a Shortened tests again (hitting timeouts...) 2008-09-29 14:38:19 +00:00