Skip to content
Snippets Groups Projects
  • Konstantin Osipov's avatar
    a28c57bf
    Modify format of server snapshot to version 12. · a28c57bf
    Konstantin Osipov authored
    The new server snapshot format is identical to format of
    XLOG, i.e. it contains REPLACE statements with BOX_INSERT
    flags for every tuple in a space.
    
    This allows to streamline recovery, since rows from a snapshot
    can be treated the same as rows from the write ahead log (XLOG).
    
    This is an incompatible change:
     - tarantool 1.5 won't be able to read data of tarantool 1.6
     - tarantool 1.6, without extra effort, won't be able
     to read data of tarantool 1.5 (a conversion procedure is needed).
    
     This change as such doesn't break replication, but further changes
    are in the pipeline which will inevitably finish this matter up as well.
    
    Why this patch is necessary
    ---------------------------
    
    To create system spaces dict-v5 branch employs on_replace triggers
    mechanism, fired off by txn_replace(). Thus it's vital that all changes
    go into spaces using txn_replace().
    
    What else this patch does
    -------------------------
    
    - since now XLOG and SNAP have the same format, log_io.cc
    code has become a bit simpler
    - struct key_def is re-factored to simplify dynamic creation/deletion
    of keys
    - reference counting for tuple formats is added
    - a number of error messages is improved to provide part no
    in a multipart key.
    - space cache is split away from space.cc into a separate
    module, schema.[h,cc]
    a28c57bf
    History
    Modify format of server snapshot to version 12.
    Konstantin Osipov authored
    The new server snapshot format is identical to format of
    XLOG, i.e. it contains REPLACE statements with BOX_INSERT
    flags for every tuple in a space.
    
    This allows to streamline recovery, since rows from a snapshot
    can be treated the same as rows from the write ahead log (XLOG).
    
    This is an incompatible change:
     - tarantool 1.5 won't be able to read data of tarantool 1.6
     - tarantool 1.6, without extra effort, won't be able
     to read data of tarantool 1.5 (a conversion procedure is needed).
    
     This change as such doesn't break replication, but further changes
    are in the pipeline which will inevitably finish this matter up as well.
    
    Why this patch is necessary
    ---------------------------
    
    To create system spaces dict-v5 branch employs on_replace triggers
    mechanism, fired off by txn_replace(). Thus it's vital that all changes
    go into spaces using txn_replace().
    
    What else this patch does
    -------------------------
    
    - since now XLOG and SNAP have the same format, log_io.cc
    code has become a bit simpler
    - struct key_def is re-factored to simplify dynamic creation/deletion
    of keys
    - reference counting for tuple formats is added
    - a number of error messages is improved to provide part no
    in a multipart key.
    - space cache is split away from space.cc into a separate
    module, schema.[h,cc]
log_io.h 4.09 KiB