美文网首页
openGauss源码#事务之access.h文件:为单行访问保

openGauss源码#事务之access.h文件:为单行访问保

作者: upup果 | 来源:发表于2020-12-15 08:40 被阅读0次

类Access:为单行访问保存数据

  • 成员变量
    原始行m_localInsertRow,修改的行m_localRow,辅助行m_auxRow
    原始的行头 Sentinel* m_origSentinel,表示更新的列的 BitmapSet m_modifiedColumns
    本地访问参数AccessParams<uint8_t> m_params:主要是一些访问的标志位,如主Sentinel,唯一索引,提交等
    以及事务ID m_tid,事务语句计数m_stmtCount,行访问类型m_type,本地行数量m_localRowSize
  • 函数
    Sentinel* GetSentinel():返回m_origSentinel
    Row* GetRowFromHeader():不是升级插入则返回m_localInsertRow,否则就 m_origSentinel->GetData()
    Row* GetTxnRow():获取OCC事务使用的行的一致本地副本。如果访问不是插入,返回m_localRow。如果是插入,返回实际的未发布的私有行m_localInsertRow,而升级插入,即删除后插入,返回辅助行m_auxRow

相关文章

网友评论

      本文标题:openGauss源码#事务之access.h文件:为单行访问保

      本文链接:https://www.haomeiwen.com/subject/sjfrgktx.html