nathanielherman / sto Goto Github PK
View Code? Open in Web Editor NEWSoftware Transactional Objects
Software Transactional Objects
vacation
TGeneric
hard_check_opacity()
Looks like right now when we dereference an iterator, it gives us the value rather than a std::pair<K, T>
?
std::map<int, int> m;
m[1] = 1;
auto it = m.end();
--it;
std::cout << it->first << ", " << it->second << std::endl;
will print 1,1
...
So NULL
pointer probably doesn't work... we need a sentinel node.
The way constructors/destructors of TestTransaction class works seems very problematic. I've changed the destructor to do nothing (instead of reverting to a "base" transaction) to avoid bugs in many of our unit tests.
Taking a new snapshot involves loading the current global _TID
value, set the LSB, and write the resulting value to _GSC
(global snapshot counter), all atomically. Since _TID
and _GSC
span different words, a 16-byte compare-and-swap is probably required. Would also need a struct to enclose _TID
and _GSC
to make sure they are adjacent to each other.
Can we delete List1? I mean obviously we can. :) So: What are the reasons to NOT delete List1?
I found a couple very serious bugs:
RBTreeInternal.hh
: In find_any()
, we are actually returning the grandparent of the absent key... Took me almost the entire afternoon to figure out why find_any()
and insert()
returned different parents...RBTree.hh
: We forgot to unlock before we abort in find_or_abort()
Fixed in 7944322 (on rbtree_bn
)
TODOs:
Rather than a “Transaction&”, Transaction::get_transaction() should return a TransactionProxy, which aborts when out of scope.
A slight refinement on this would let us make nested transactions.
cleanup()
when you can't know whether some other part of the data structure has been locked.Sto::check_in_progress()
be an assertion?Vector
uses conflictingly-typed keys (Vector* this vs. int), all keys should be same typecheck_predicate
cleanup
only if has_write
versioned_value_struct
leaks memoryTVersion
type which encapsulates a version numberadd_read(TVersion)
to automatically handle opacityPriorityQueue::empty_key
work? Is that actually a predicate?RBTree.hh:144
) doesn't seem sufficient. Checking Tids stored in versioned_value
's themselves probably a better idea?RBTree.hh:213
); RBTreeInternal::find_any()
is not thread-safe. If we are returning a pointer like this then our erase
method should never actually "erase" any node -- not even after the transaction commits. Let's do RCU garbage collection instead.I may be overthinking this but I'm really worried about the following scenario:
txn1 updated key x, not committed yet
txn2 came in, deleted key x, and committed
txn3 came in, re-inserted key x, not committed yet
Back to txn1, read check passed, in install()
turning the update to an "insert", only to find out key x already existed in the tree in a phantom state (with insert bit set because txn3 is not committed yet)
Now what should we do... Should we abort the txn1? We already passed read-check so we can't. Should we abort txn3? Ideally we don't want to since it's an insert-only transaction. So both transactions should commit. But how? txn1 cannot lock the node holding key x right now because it may deadlock...
Hi there, I really like this project and am trying to build something on top of it. In particular, I'm interested in the case where the workload has a lot of contention. To achieve this I ran the tpcc benchmark with only 1 warehouse on 24 cores. I found that an assert in the code is not passing. This issue is fully reproducible with the following command line, which is what I am using for compiling and running:
MODE=perf CXX=c++\ -std=gnu++0x make -j dbtest
out-perf.masstree/benchmarks/dbtest --runtime 30 --num-threads 24 --scale-factor 1 --bench tpcc -dmbta --retry-aborted-transactions --verbose
The failed assertion is in tpcc.cc:1838
ALWAYS_ASSERT(c_order_line.n >= 5 && c_order_line.n <= 15);
The same command line runs fine with the stock Silo. Thanks!
Things like this look like race conditions to me...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.