Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f8e983c
add RVREPL_OOS_*
H2SU Jan 22, 2026
d0d3d68
add oos replication
H2SU Jan 22, 2026
220b69c
fix bug
H2SU Jan 22, 2026
564c9e6
add a record type change to REC_HOME
H2SU Jan 23, 2026
415b6b2
fix bug
H2SU Jan 23, 2026
090f18e
fix locator_fixup_oos_oids_in_recdes()
H2SU Jan 23, 2026
48b4baa
fix bug
H2SU Jan 23, 2026
0159885
add oos_oid_queue.cpp in cmakelist
H2SU Jan 29, 2026
37bde9f
remove static function (heap_recdes_contains_oos)
H2SU Jan 29, 2026
9965909
change todo message
H2SU Jan 29, 2026
91358a7
remove oos_get_oos_record_header_size() function
H2SU Jan 29, 2026
519a997
fix locator_fixup_oos_oids_in_recdes() function
H2SU Jan 29, 2026
285bfdf
add TODO message
H2SU Jan 29, 2026
0ce70ba
add license
H2SU Feb 3, 2026
b70e2ae
fix RV_LAST_LOGID
H2SU Feb 3, 2026
8eb3e54
add oos_oid_queue_push()
H2SU Feb 3, 2026
3ec48b9
remove OR_GET_INT in locator_fixup_oos_oids_in_recdes
H2SU Feb 5, 2026
22eeece
remove is_repl param
H2SU Feb 5, 2026
b94ee64
fix codestyle
H2SU Feb 5, 2026
2f8672e
쓰레드 엔트리에 oos_oid 추가
H2SU Feb 11, 2026
e01dd69
oos_rec_header 구조체 hpp로 이관
H2SU Feb 11, 2026
44f36a9
OOS_REC_HEADER_SIZE 사용하도록 변경
H2SU Feb 11, 2026
78f70ca
oos_oid를 thread_p->oos_oids에 저장해놨다가 사용하는 방식으로 수정
H2SU Feb 11, 2026
5865aba
fix oos repl log insert
H2SU Feb 11, 2026
edcee87
debug code
H2SU Feb 11, 2026
31997fc
add oos_insert_lsa_queue in tdes
H2SU Feb 12, 2026
8268ad8
fix oos_oids.clear code
H2SU Feb 12, 2026
4ea2995
revert
H2SU Feb 12, 2026
dc4016f
remove debug code
H2SU Feb 12, 2026
28492b8
Revert "add oos_oid_queue.cpp in cmakelist"
H2SU Feb 12, 2026
b2b7bff
delete oos_oid_queue file
H2SU Feb 12, 2026
b9d391b
fix
H2SU Feb 12, 2026
035a028
add TODO
H2SU Feb 13, 2026
4946e7d
feedback
H2SU Feb 13, 2026
2d37482
remove debug code
H2SU Feb 13, 2026
40eeaa8
add init oos tracking info in locator_oos_insert_force()
H2SU Feb 13, 2026
bbc5712
fix
H2SU Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/connection/server_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -2683,6 +2683,7 @@ css_set_thread_info (THREAD_ENTRY * thread_p, int client_id, int rid, int tran_i
thread_p->lockwait_state = -1;
thread_p->query_entry = NULL;
thread_p->tran_next_wait = NULL;
thread_p->oos_oids.clear ();

thread_p->end_resource_tracks ();
thread_clear_recursion_depth (thread_p);
Expand Down
20 changes: 18 additions & 2 deletions src/storage/heap_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,6 @@ static int heap_update_and_log_header (THREAD_ENTRY * thread_p, const HFID * hfi
const PGBUF_WATCHER heap_header_watcher, HEAP_HDR_STATS * heap_hdr,
const VPID new_next_vpid, const VPID new_last_vpid, const int new_num_pages);

static bool heap_recdes_contains_oos (const RECDES * record);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heap_file.hpp에 extern으로 선언

static SCAN_CODE heap_record_replace_oos_oids_with_values_if_exists (THREAD_ENTRY * thread_p,
HEAP_GET_CONTEXT * context);

Expand Down Expand Up @@ -12264,6 +12263,8 @@ heap_attrinfo_insert_to_oos (THREAD_ENTRY * thread_p, HEAP_CACHE_ATTRINFO * attr
VFID oos_vfid;
OID oos_oid;
RECDES recdes;
LOG_TDES *tdes;
int tran_index;
int i;

recdes.area_size = IO_MAX_PAGE_SIZE;
Expand All @@ -12280,6 +12281,19 @@ heap_attrinfo_insert_to_oos (THREAD_ENTRY * thread_p, HEAP_CACHE_ATTRINFO * attr
return S_ERROR;
}

/* Find transaction descriptor for current logging transaction */
tran_index = LOG_FIND_THREAD_TRAN_INDEX (thread_p);
tdes = LOG_FIND_TDES (tran_index);
if (tdes == NULL)
{
er_set (ER_FATAL_ERROR_SEVERITY, ARG_FILE_LINE, ER_LOG_UNKNOWN_TRANINDEX, 1, tran_index);
return S_ERROR;
}

/* init oos tracking info */
tdes->oos_insert_lsa_queue.clear ();
thread_p->oos_oids.clear ();

for (i = 0; i < attr_info->num_values; i++)
{
/* is this oos column ? */
Expand All @@ -12297,6 +12311,8 @@ heap_attrinfo_insert_to_oos (THREAD_ENTRY * thread_p, HEAP_CACHE_ATTRINFO * attr
{
return S_ERROR;
}

thread_p->oos_oids.push_back (oos_oid); /* for replication log */
(*oos_oids)[i] = oos_oid;
if (recdes.data != PTR_ALIGN (recbuf, MAX_ALIGNMENT))
{
Expand Down Expand Up @@ -27596,7 +27612,7 @@ heap_log_postpone_heap_append_pages (THREAD_ENTRY * thread_p, const HFID * hfid,

// *INDENT-ON*

static bool
bool
heap_recdes_contains_oos (const RECDES * record)
{
int flag = (INT32) OR_GET_MVCC_FLAG (record->data);
Expand Down
4 changes: 4 additions & 0 deletions src/storage/heap_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,10 @@ extern int heap_nonheader_page_capacity ();

extern int heap_rv_postpone_append_pages_to_heap (THREAD_ENTRY * thread_p, LOG_RCV * recv);
extern void heap_rv_dump_append_pages_to_heap (FILE * fp, int length, void *data);

extern bool heap_oos_find_vfid (THREAD_ENTRY * thread_p, const HFID * hfid, VFID * oos_vfid, bool docreate);
extern bool heap_recdes_contains_oos (const RECDES * record);

// *INDENT-OFF*
extern void heap_log_postpone_heap_append_pages (THREAD_ENTRY * thread_p, const HFID * hfid, const OID * class_oid,
const std::vector<VPID> &heap_pages_array);
Expand Down
14 changes: 6 additions & 8 deletions src/storage/oos_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@
// XXX: SHOULD BE THE LAST INCLUDE HEADER
#include "memory_wrapper.hpp"

struct oos_record_header
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.hpp로 이동

{
int total_size;
int chunk_index;
OID next_chunk_oid;
};
using OOS_RECORD_HEADER = struct oos_record_header;

// ****************************************************************************
// static functions
// ****************************************************************************
Expand Down Expand Up @@ -674,6 +666,12 @@ oos_rv_redo_insert (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
return NO_ERROR;
}

void
oos_push_oos_oid (THREAD_ENTRY *thread_p, const OID *oid)
{
thread_p->oos_oids.push_back (*oid);
}

#if defined(CUBRID_UNIT_TEST_ENABLED)
int
bridge_oos_get_max_chunk_size_within_page ()
Expand Down
24 changes: 23 additions & 1 deletion src/storage/oos_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,32 @@
#include "storage_common.h"
#include "thread_compat.hpp"

struct oos_record_header
{
int total_size;
int chunk_index;
OID next_chunk_oid;
};
using OOS_RECORD_HEADER = struct oos_record_header;

#define OOS_RECORD_HEADER_SIZE ((int) sizeof (OOS_RECORD_HEADER))

extern int oos_file_create (THREAD_ENTRY *thread_p, VFID &oos_vfid);
extern int oos_file_destroy (THREAD_ENTRY *thread_p, const VFID &oos_vfid);
extern int oos_insert (THREAD_ENTRY *thread_p, const VFID &oos_vfid, RECDES &recdes, OID &oid);
extern int oos_read (THREAD_ENTRY *thread_p, const OID &oid, RECDES &recdes);

extern int oos_rv_redo_delete (THREAD_ENTRY *thread_p, LOG_RCV *rcv);
extern int oos_rv_redo_insert (THREAD_ENTRY *thread_p, LOG_RCV *rcv);
extern int oos_rv_redo_insert (THREAD_ENTRY *thread_p, LOG_RCV *rcv);


#ifdef __cplusplus
extern "C"
{
#endif

extern void oos_push_oos_oid (THREAD_ENTRY *thread_p, const OID *oid);

#ifdef __cplusplus
}
#endif
4 changes: 3 additions & 1 deletion src/storage/tde.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ typedef struct tde_mk_file_item
|| (rcvindex) == RVBT_ONLINE_INDEX_UNDO_TRAN_INSERT \
|| (rcvindex) == RVBT_ONLINE_INDEX_UNDO_TRAN_DELETE \
|| (rcvindex) == RVOOS_INSERT \
|| (rcvindex) == RVOOS_DELETE)
|| (rcvindex) == RVOOS_DELETE \
|| (rcvindex) == RVREPL_OOS_INSERT \
|| (rcvindex) == RVREPL_OOS_DELETE)
Comment on lines +140 to +141
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOS Replication log는 OID를 queue에 넣어 치환하는 작업을 추가로 진행해줘야하기 때문에 rcvindex 타입을 추가하였습니다.


#define tde_er_log(...) if (prm_get_bool_value (PRM_ID_ER_LOG_TDE)) _er_log_debug (ARG_FILE_LINE, "TDE: " __VA_ARGS__)

Expand Down
4 changes: 4 additions & 0 deletions src/thread/thread_entry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

#include <cassert>

#include <vector>
#include "oid.h"
// forward definitions

// from connection_defs.h
Expand Down Expand Up @@ -308,6 +310,8 @@ namespace cubthread

bool m_skip_end_resource_tracks_in_recycle;

std::vector<OID> oos_oids;

thread_id_t get_id ();
pthread_t get_posix_id ();
void register_id ();
Expand Down
7 changes: 6 additions & 1 deletion src/transaction/locator.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,21 @@ typedef enum
LC_FLUSH_INSERT,
LC_FLUSH_INSERT_PRUNE,
LC_FLUSH_INSERT_PRUNE_VERIFY,
LC_FLUSH_INSERT_OOS,
LC_FLUSH_DELETE,
LC_FLUSH_UPDATE,
LC_FLUSH_UPDATE_PRUNE,
LC_FLUSH_UPDATE_PRUNE_VERIFY,
LC_FETCH_VERIFY_CHN
} LC_COPYAREA_OPERATION;

/* TODO:
* Handle LC_FLUSH_INSERT_OOS in LC_IS_FLUSH_INSERT usage to prevent malfunctions.
* Post-POC, refactor by separating macros or implementing exception handling for OOS call sites.
*/
#define LC_IS_FLUSH_INSERT(operation) \
(operation == LC_FLUSH_INSERT || operation == LC_FLUSH_INSERT_PRUNE \
|| operation == LC_FLUSH_INSERT_PRUNE_VERIFY)
|| operation == LC_FLUSH_INSERT_PRUNE_VERIFY || operation == LC_FLUSH_INSERT_OOS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO 기술 - LC_IS_FLUSH_INSERT 매크로 사용처에서 LC_FLUSH_INSERT_OOS가 고려되고 있지 않아 오동작 가능성이 열려 있습니다. POC 이후에는 매크로 분리 또는 LC_FLUSH_INSERT_OOS 호출 부에서 예외 처리 등을 고려해 봐야 합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO 기술하였습니다


#define LC_IS_FLUSH_UPDATE(operation) \
(operation == LC_FLUSH_UPDATE || operation == LC_FLUSH_UPDATE_PRUNE \
Expand Down
Loading
Loading