DPN作为PACK的元数据,对下用于访问具体的PACK,对上形成知识网格,在整个逻辑关系中,DPN的数据对于数据的访问起到了中枢的作用。
本文对DPN的数据结构的使用关系做说明。
- uint8_t used : 1; // occupied or not
- uint8_t local : 1; // owned by a write transaction, thus to-be-commit
- uint8_t synced : 1; // if the pack data in memory is up to date with the
- // version on disk
- uint8_t null_compressed : 1;
- uint8_t data_compressed : 1;
- uint8_t no_compress : 1;
- uint8_t padding[3];
- uint32_t base; // index of the DPN from which we copied, used by local pack
- uint64_t addr; // data start address
- uint64_t len; // data length
- uint32_t nr; // number of records
- uint32_t nn; // number of nulls
- common::TX_ID xmin; // creation trx id
- common::TX_ID xmax; // delete trx id
- union {
- int64_t min_i;
- double min_d;
- char min_s[8];
- };
- union {
- int64_t max_i;