Zero  0.1.0
Public Member Functions | Public Attributes | List of all members
CArraySlot Struct Reference

One slot in ConsolidationArray. More...

#include <log_carray.h>

Public Member Functions

CArraySlot volatile * vthis ()
 
const CArraySlot volatile * vthis () const
 

Public Attributes

mcs_lock::qnode me2
 The secondary queue lock used to delegate buffer-release. Lock head is ConsolidationArray::_expose_lock. This must be the first member as we reinterpret qnode as insert_info. See Section A.3 of Aether paper. More...
 
lsn_t lsn
 
int64_t old_end
 
int64_t start_pos
 
int64_t pos
 
int64_t new_end
 
int64_t new_base
 
carray_status_t count
 The current status of this slot. More...
 
mcs_lock::qnode me
 
mcs_lock::qnodepred2
 
w_error_codes error
 
char padding [32 - sizeof(w_error_codes)]
 

Detailed Description

One slot in ConsolidationArray.

Each slot belongs to two mcs_lock queues, one for buffer acquisition (me/_insert_lock) and another for buffer release (me2/_expose_lock).

Member Function Documentation

§ vthis() [1/2]

CArraySlot volatile* CArraySlot::vthis ( )
inline

volatile accesses to make sure compiler isn't fooling us. Most code anyway relies on atomic operations. These are not heavily used.

§ vthis() [2/2]

const CArraySlot volatile* CArraySlot::vthis ( ) const
inline

const version.

Member Data Documentation

§ count

carray_status_t CArraySlot::count

The current status of this slot.

This is the key variable used for every atomic operation of C-array slot.

See also
carray_status_t

§ error

w_error_codes CArraySlot::error

Set when inserting the log of this slot failed, so far only eOUTOFLOGSPACE possible.

§ lsn

lsn_t CArraySlot::lsn

where will we end up on disk?

§ me

mcs_lock::qnode CArraySlot::me

The main queue lock used to acquire log buffers. Lock head is log_core::_insert_lock.

Note
This should not be in the same cache line as me2.

§ me2

mcs_lock::qnode CArraySlot::me2

The secondary queue lock used to delegate buffer-release. Lock head is ConsolidationArray::_expose_lock. This must be the first member as we reinterpret qnode as insert_info. See Section A.3 of Aether paper.

§ new_base

int64_t CArraySlot::new_base

positive if we started a new partition

§ new_end

int64_t CArraySlot::new_end

eventually assigned to _cur_epoch.

§ old_end

int64_t CArraySlot::old_end

end point of our predecessor.

§ padding

char CArraySlot::padding[32 - sizeof(w_error_codes)]

To make this multiply of cacheline size.

§ pos

int64_t CArraySlot::pos

how much of the allocation already claimed?

§ pred2

mcs_lock::qnode* CArraySlot::pred2

Predecessor qnode of me2. Used to delegate buffer release.

§ start_pos

int64_t CArraySlot::start_pos

start point for thread groups.


The documentation for this struct was generated from the following file: