Merge branch 'memory' into snapshot

This commit is contained in:
Kruno Tomola Fabro 2016-09-12 20:18:30 +01:00
commit 1a136af84a
2 changed files with 12 additions and 20 deletions

View File

@ -19,7 +19,8 @@ public:
union HintBits;
private:
enum Flags : uint8_t {
enum Flags : uint8_t
{
CRE_CMT = 0x01, // __01
CRE_ABT = 0x02, // __10
EXP_CMT = 0x04, // 01__
@ -36,15 +37,9 @@ private:
struct Value
{
bool is_committed() const
{
return bits & COMMITTED;
}
bool is_committed() const { return bits & COMMITTED; }
bool is_aborted() const
{
return bits & ABORTED;
}
bool is_aborted() const { return bits & ABORTED; }
bool is_unknown() const
{
@ -84,10 +79,7 @@ private:
};
public:
Hints() : cre(bits), exp(bits)
{
assert(bits.is_lock_free());
}
Hints() : cre(bits), exp(bits) { assert(bits.is_lock_free()); }
union HintBits
{
@ -107,5 +99,4 @@ public:
std::atomic<uint8_t> bits{0};
};
}

View File

@ -37,8 +37,9 @@ public:
Hints hints;
// NOTE: Wasn't used.
// this lock is used by write queries when they update or delete records
RecordLock lock;
// RecordLock lock;
// check if this record is visible to the transaction t
bool visible(const tx::TransactionRead &t)