Package bw :: Package poseidon :: Module seaserver :: Class Sea
[frames] | no frames]

Class Sea

                object --+    
                         |    
ioengine.PersistenceEngine --+
                             |
                            Sea

This storage works exactly like the Ocean storage but the format of data storage is different. It assumes that each data value is a list/set of fixed length records (true for ls, lv, lo but not memes or links) With this assumption, it does not need pickling and is capable of writing partial records (to speed up commits). During a partial write, in case there is no space, it uses binomial expansion to allocate more space at the end of the file

This scheme is similar to MySQL except that we are storing 'multiple tables' in one file (since each data value is a 'table') Hence, binomial expansion is required for automatic tablespace management.

Multi Version Concurrency Control This is easily done in Ocean. However, there are some complications for Sea. The thread local index must also track the (old) length of each table so that it knows how much data to read. In this way, the reference AND the num_rows of each table is read from the index Hence, the header parsing of the tablespace is only for validity checking (i.e the num_rows is stored redundantly in the tablespace header as well as the index)

Instance Methods
 
__init__(self, fn, options)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
load_index(self)
 
load_cache(self)
 
recreate_index(self)
Read the datafile and create the index file
 
read_disk(self, key, ttime)
 
find_table_count(self, i, ttime)
 
commit(self, current_tid, ttime, transaction_data)
 
stats(self)
Return useful statistics on the store.

Inherited from ioengine.PersistenceEngine: __repr__, clean_index, close, create, create_snapshot, flush_index, get, get_options, get_r_fp, has_key, is_snaphot, mark_index_inconsistent, read, read_header, rollback, upgrade, validate_transaction

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables

Inherited from ioengine.PersistenceEngine: r_fp

Properties

Inherited from object: __class__

Method Details

__init__(self, fn, options)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

load_index(self)

 
Overrides: ioengine.PersistenceEngine.load_index

load_cache(self)

 
Overrides: ioengine.PersistenceEngine.load_cache

recreate_index(self)

 

Read the datafile and create the index file

Overrides: ioengine.PersistenceEngine.recreate_index
(inherited documentation)

read_disk(self, key, ttime)

 
Overrides: ioengine.PersistenceEngine.read_disk

commit(self, current_tid, ttime, transaction_data)

 
Overrides: ioengine.PersistenceEngine.commit

stats(self)

 

Return useful statistics on the store.

  • version
  • system endianness
  • storage engine
  • disk data size
  • index data size
  • created time
  • last modification
  • uptime (in seconds)
  • number of items
  • total reads operations
  • cache hits
  • total number of commits
  • tau
  • pack/flush/commit state
Overrides: ioengine.PersistenceEngine.stats
(inherited documentation)