CBRD-26628 코드 중심 설명

전체 흐름 요약

MASTER
  oos_insert_across_pages()
    LOG_DUMMY_OOS_RECORD 기록
    RVOOS_INSERT chunk logs 기록: tail -> ... -> head
    replication queue에는 dummy_lsa, tail_chunk_lsa만 저장
    thread_p->oos_oids에는 null OID를 먼저 저장

  locator_sr.c
    null OID  -> RVREPL_DUMMY_OOS_RECORD
    real OID  -> RVREPL_OOS_INSERT

SLAVE
  log_applier.c
    RVREPL_DUMMY_OOS_RECORD -> need_oos_rebuild = true
    다음 RVREPL_OOS_INSERT -> tail_chunk_lsa부터 log를 따라가며 OOS record 재조립
    OOS insert와 다음 heap record를 같은 flush에 묶음

핵심은 “모든 OOS chunk log는 그대로 남기되, replication item은 boundary marker와 시작 LSA만 전달한다”는 것이다.

1. 새 log type과 recovery index

src/transaction/log_record.hpp

LOG_SUPPLEMENTAL_INFO = 52, /* used for supplemental logs to support CDC interface.
                 * it contains transaction user info, DDL statement, undo lsa, redo lsa for DML,
                 * or undo images that never retrieved from the log. */
LOG_DUMMY_OOS_RECORD = 53,  /* boundary marker indicating the start of a multi-chunk OOS record;
                 * emitted by the master before the RVOOS_INSERT chunks so the slave
                 * applier can distinguish a multi-chunk OOS record from a series of
                 * independent single-chunk OOS inserts. */

설명:

src/transaction/recovery.h

RVOOS_INSERT = 130,
RVOOS_DELETE = 131,
RVREPL_OOS_INSERT = 132,
RVREPL_OOS_DELETE = 133,
RVOOS_NOTIFY_VACUUM = 134,
RVREPL_DUMMY_OOS_RECORD = 135,
RV_LAST_LOGID = RVREPL_DUMMY_OOS_RECORD,

설명:

src/transaction/recovery.c