1/*- 2 * Copyright (c) 2001, 2020 Oracle and/or its affiliates. All rights reserved. 3 * 4 * See the file LICENSE for license information. 5 * 6 * $Id$ 7 */ 8 9DBPRIVATE 10PREFIX __rep 11 12INCLUDE #include "db_int.h" 13INCLUDE #include "dbinc/db_page.h" 14INCLUDE #include "dbinc/db_am.h" 15INCLUDE #include "dbinc/mp.h" 16INCLUDE #include "dbinc/txn.h" 17INCLUDE 18 19/* 20 * bulk - message for bulk log records or pages 21 */ 22BEGIN_MSG bulk check_length 23ARG len u_int32_t 24ARG lsn DB_LSN 25ARG bulkdata DBT 26END 27 28/* 29 * control - replication control message 30 */ 31BEGIN_MSG control check_length 32ARG rep_version u_int32_t 33ARG log_version u_int32_t 34ARG lsn DB_LSN 35ARG rectype u_int32_t 36ARG gen u_int32_t 37ARG msg_sec u_int32_t 38ARG msg_nsec u_int32_t 39ARG flags u_int32_t 40END 41 42/* 43 * egen data 44 */ 45BEGIN_MSG egen check_length 46ARG egen u_int32_t 47END 48 49/* 50 * file info 51 * 52 * NOTE: The order of the DBTs is important and relevant in the 53 * GET_CURINFO macro. 54 */ 55BEGIN_MSG fileinfo alloc check_length 56ARG pgsize u_int32_t 57ARG pgno db_pgno_t 58ARG max_pgno db_pgno_t 59ARG filenum u_int32_t 60ARG finfo_flags u_int32_t 61ARG type u_int32_t 62ARG db_flags u_int32_t 63ARG uid DBT 64ARG info DBT 65ARG dir DBT 66ARG blob_fid_lo u_int32_t 67ARG blob_fid_hi u_int32_t 68END 69 70BEGIN_MSG fileinfo_v7 alloc check_length 71ARG pgsize u_int32_t 72ARG pgno db_pgno_t 73ARG max_pgno db_pgno_t 74ARG filenum u_int32_t 75ARG finfo_flags u_int32_t 76ARG type u_int32_t 77ARG db_flags u_int32_t 78ARG uid DBT 79ARG info DBT 80ARG dir DBT 81END 82 83BEGIN_MSG fileinfo_v6 alloc check_length 84ARG pgsize u_int32_t 85ARG pgno db_pgno_t 86ARG max_pgno db_pgno_t 87ARG filenum u_int32_t 88ARG finfo_flags u_int32_t 89ARG type u_int32_t 90ARG db_flags u_int32_t 91ARG uid DBT 92ARG info DBT 93END 94 95/* 96 * grant info - clients send to masters granting a lease. 97 */ 98BEGIN_MSG grant_info check_length 99ARG msg_sec u_int32_t 100ARG msg_nsec u_int32_t 101END 102 103/* 104 * We do not need to do anything with LOG record data. 105 * It is opaque data to us. 106 */ 107 108/* 109 * log request 110 */ 111BEGIN_MSG logreq check_length 112ARG endlsn DB_LSN 113END 114 115/* 116 * We do not need to do anything with NEWCLIENT/NEWSITE cdata dbt. 117 * It is user data and the app has to do whatever transformation 118 * it needs to with its own data. 119 */ 120/* 121 * newfile version 122 */ 123BEGIN_MSG newfile check_length 124ARG version u_int32_t 125END 126 127/* 128 * update - send update information 129 */ 130BEGIN_MSG update alloc check_length 131ARG first_lsn DB_LSN 132ARG first_vers u_int32_t 133ARG num_files u_int32_t 134END 135 136/* 137 * vote info. Current version. 138 */ 139BEGIN_MSG vote_info check_length 140ARG egen u_int32_t 141ARG nsites u_int32_t 142ARG nvotes u_int32_t 143ARG priority u_int32_t 144ARG spare_pri u_int32_t 145ARG tiebreaker u_int32_t 146ARG data_gen u_int32_t 147END 148/* 149 * vote info old version from REPVERSION 5 and earlier. 150 */ 151BEGIN_MSG vote_info_v5 check_length 152ARG egen u_int32_t 153ARG nsites u_int32_t 154ARG nvotes u_int32_t 155ARG priority u_int32_t 156ARG tiebreaker u_int32_t 157END 158 159/* 160 * LSN history database - key 161 */ 162BEGIN_MSG lsn_hist_key 163ARG version u_int32_t 164ARG gen u_int32_t 165END 166 167/* 168 * LSN history database - data 169 */ 170BEGIN_MSG lsn_hist_data 171ARG envid u_int32_t 172ARG lsn DB_LSN 173ARG hist_sec u_int32_t 174ARG hist_nsec u_int32_t 175END 176 177/* 178 * Request for blob files. 179 */ 180BEGIN_MSG blob_update_req 181ARG blob_fid u_int64_t 182ARG blob_sid u_int64_t 183ARG blob_id u_int64_t 184ARG highest_id u_int64_t 185ARG flags u_int32_t 186END 187 188/* 189 * Request for blob files for REPVERSION 8 190 */ 191BEGIN_MSG blob_update_req_v8 192ARG blob_fid u_int64_t 193ARG blob_sid u_int64_t 194ARG blob_id u_int64_t 195ARG highest_id u_int64_t 196END 197 198/* 199 * A list of blob file for a database. 200 */ 201BEGIN_MSG blob_update 202ARG blob_fid u_int64_t 203ARG highest_id u_int64_t 204ARG flags u_int32_t 205ARG num_blobs u_int32_t 206END 207 208/* 209 * Blob file description, part of blob_update. 210 */ 211BEGIN_MSG blob_file 212ARG blob_sid u_int64_t 213ARG blob_id u_int64_t 214ARG blob_size u_int64_t 215END 216 217/* 218 * A piece of data from a blob file. 219 */ 220BEGIN_MSG blob_chunk 221ARG flags u_int32_t 222ARG blob_fid u_int64_t 223ARG blob_sid u_int64_t 224ARG blob_id u_int64_t 225ARG offset u_int64_t 226ARG data DBT 227END 228 229/* 230 * Request for data from a blob file at the given offset. 231 */ 232BEGIN_MSG blob_chunk_req 233ARG blob_fid u_int64_t 234ARG blob_sid u_int64_t 235ARG blob_id u_int64_t 236ARG offset u_int64_t 237END 238