compose_handler.go 919 B

1234567891011121314151617181920
  1. package index
  2. import (
  3. "git.ycl.pub/yl32940/TsDB2/DB/core/page"
  4. )
  5. func init() {
  6. Compose.RegisterHandler(page.IndexTypeCompose, &ComposeChainHandler{})
  7. }
  8. // ======================== IndexHandler: 复合二级索引处理器 ========================
  9. // ComposeChainHandler — 复合二级索引 (page.IndexTypeCompose)
  10. // 底层即 B+ 树二级索引: IndexHandler 的 5 个方法与 InsertBatch 全部由嵌入的
  11. // sbtSecondary 基座提供 (与 BTreeHandler 共享 btree.SBT* 实现), 条目格式
  12. // [key(keyLen) + PKID(8B BE)], keyLen = 各分量按真实宽度定长拼接的总长
  13. // (分量不限 8 字节, 与 BTree 复合键一致); 二级索引不实现 RowStoreHandler。
  14. // InsertBatch 随基座而来: 复合索引的批量写入自动走排序批量灌叶路径,
  15. // 不再退化为逐条 Insert (IndexMetaPage.InsertRows 的 BatchInserter 分发)。
  16. type ComposeChainHandler struct{ sbtSecondary }