2022-09-05 stonedb-物理存储层-DPN解析

本文详细解析stonedb中DPN的数据结构及其作用,重点介绍了addr、len、xmin和xmax等核心成员,以及DPN如何实现MVCC。还探讨了DPN中的PACK地址标记,特别是IncRef和CAS操作的语义,包括其内存模型和相关API的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

摘要:

DPN作为PACK的元数据,对下用于访问具体的PACK,对上形成知识网格,在整个逻辑关系中,DPN的数据对于数据的访问起到了中枢的作用。

本文对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;         // 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

悟世者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值