Commit graph

1524 commits

Author SHA1 Message Date
Sears Russell
87ba38adb7 fix compilation when CONCURRENT_LRU is defined; make it the default (since it is only used by concurrentBufferManager) 2010-04-20 03:56:47 +00:00
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
887832582c expose stasis_handle_t up through the buffer manager; add sequential I/O hinting; fix stupid busy-wait in prefetch 2010-04-12 20:54:10 +00:00
Sears Russell
7c5eb2a7e9 added dup method to io handles 2010-04-08 23:50:01 +00:00
Sears Russell
ff2f2e9e1e add TregionPrefetch() 2010-03-31 22:41:33 +00:00
Sears Russell
358f037441 fix concurrency bug that cropped up when the concurrent buffer manager was used with the concurrent wrapper replacement policy. Concurrent wrapper hashes on pageid, but the buffer manager was changing the pageid out from under it 2010-03-31 22:39:07 +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
e17e948697 add missing return statement 2010-03-29 22:29:14 +00:00
Sears Russell
8a5bbd9a38 silence compiler warning 2010-03-29 22:28:32 +00:00
Sears Russell
6deb34f5b2 fix handling of loadPageForOperation during recovery; initialize rid.size in slottedLast 2010-03-22 19:56:55 +00:00
Sears Russell
85abeb9d77 Fix ArrayList regressions 2010-02-18 19:50:06 +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
6454d55a42 fix bug in loadUninitializedPage(). It was passing INVALID_XID into the transaction table, which is not allowed 2010-02-18 19:04:39 +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
adfecfada3 Fix LSN handling in loadUninitializedPage() 2010-02-18 04:11:22 +00:00
Sears Russell
ba3179710b Suppress shutdown warning when empty transactions are automatically rolled back. 2010-02-17 05:10:30 +00:00
Sears Russell
5d0500dc7a Perl updates:
- Cleaned up initialization and shutdown.
 - Add support for autocommitted hashes
 - Wrote preliminary perldocs
 - Updated sample cgi scripts. 
 - Added new (partial) wiki thing
 - Added stasis.pl (a simple toplevel)
2010-02-17 05:05:23 +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
0afb9177ac C++ compatibility fix 2010-02-11 22:18:49 +00:00
Sears Russell
c440f7ad62 fix typo in uncompiled code 2010-02-11 22:18:17 +00:00
Sears Russell
078d518bb6 cleaned up some lsn-free stuff 2010-02-11 21:21:31 +00:00
Sears Russell
757a877c84 added VALGRIND_MODE 2010-02-11 21:18:26 +00:00
Sears Russell
1ff9afb753 added new constant: INVALID_SIZE 2010-02-11 20:36:33 +00:00
Sears Russell
fac5d2ff37 fix default LSN handling for pages with headers 2010-02-11 20:35:38 +00:00
Sears Russell
a5abadb580 partial update for fastcgi, clean up Stasis.pm 2010-01-27 21:49:12 +00:00
Sears Russell
9bdaf23764 add some more thread-safe pblHt wrappers to fix lockManager 2010-01-23 00:27:01 +00:00
Sears Russell
031e21fa6c fix race condition introduced by last commit 2010-01-22 23:52:57 +00:00
Sears Russell
3e2bbc2eb6 move lsn sets into reserve_entry. write_entry is now a no-op 2010-01-22 23:41:10 +00:00
Sears Russell
903728c589 shorten dirtyPageTable test. 2010-01-22 23:39:42 +00:00
Sears Russell
bb182ee0b0 fix new truncation check; it was using values for the old copy of the log to check the new copy. 2010-01-22 19:13:14 +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
51dc17d1c3 fail earlier on mismatched truncation file. One run of check_multiplexer saw truncation leave a zero byte log 2010-01-21 23:48:04 +00:00
Sears Russell
bb92d86c85 fix check_lockManager. The lock manager now relies on a global mutex to protect its hashtables. Eventually, it should be ported over to the concurrentHash API (or something more general purpose...) 2010-01-21 22:43:38 +00:00
Sears Russell
434cec1b6a fix for regression in r1335. nextUnstableLSN needs to point to the beginning of a valid log entry. Add sizeof(lsn_t) to its computation so that we point at the beginning of the next entry, not to its size 2010-01-21 22:30:02 +00:00
Sears Russell
17ac09c652 fix deadlock in check_multiplexer. 2010-01-21 21:53:18 +00:00
Sears Russell
e2498b62be fix deadlock; reorderingHandle was acquiring a write latch while writing a log entry, leading to an inconsistent latch ordering 2010-01-21 21:05:25 +00:00
Sears Russell
dbf253275f fix nested top action log race; because of a refactoring mistake, it was releasing a mutex without acquiring it... 2010-01-21 20:27:35 +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
5f705a4463 skip the log force when TforceCommits() is called and the entire log has already been forced. The old behavior generated a redundant CRC entry and force wrote it. 2010-01-21 18:42:50 +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
f1f1d888e4 avoid use of -Wno-variadic-macros, which causes an error with gcc 3. 2010-01-20 23:51:54 +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
94b356f837 sample stasis web services for apache modperl and fastcgi. Both are multithreaded. However, the modperl one is racy. FastCGI is currently the recommended approach 2010-01-19 02:11:04 +00:00
Sears Russell
417eec45c4 harden Stasis.pm initialization against a wider range of crazy environments (ie: apache modperl and fastcgi). Add TsoftCommit and TforceCommits to the perl binding 2010-01-19 01:56:40 +00:00