github.com/matrixorigin/matrixone@v1.2.0/pkg/pb/txn/txn.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: txn.proto 3 4 package txn 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 _ "github.com/gogo/protobuf/gogoproto" 13 proto "github.com/gogo/protobuf/proto" 14 lock "github.com/matrixorigin/matrixone/pkg/pb/lock" 15 metadata "github.com/matrixorigin/matrixone/pkg/pb/metadata" 16 timestamp "github.com/matrixorigin/matrixone/pkg/pb/timestamp" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 // TxnIsolation txn txn isolation 31 type TxnIsolation int32 32 33 const ( 34 // SI snapshot isolation 35 TxnIsolation_SI TxnIsolation = 0 36 // RC read committed 37 TxnIsolation_RC TxnIsolation = 1 38 ) 39 40 var TxnIsolation_name = map[int32]string{ 41 0: "SI", 42 1: "RC", 43 } 44 45 var TxnIsolation_value = map[string]int32{ 46 "SI": 0, 47 "RC": 1, 48 } 49 50 func (x TxnIsolation) String() string { 51 return proto.EnumName(TxnIsolation_name, int32(x)) 52 } 53 54 func (TxnIsolation) EnumDescriptor() ([]byte, []int) { 55 return fileDescriptor_4f782e76b37adb9a, []int{0} 56 } 57 58 // TxnMode txn mode 59 type TxnMode int32 60 61 const ( 62 // Optimistic check conflict on commit. 63 TxnMode_Optimistic TxnMode = 0 64 // Pessimistic check conflict every write 65 TxnMode_Pessimistic TxnMode = 1 66 ) 67 68 var TxnMode_name = map[int32]string{ 69 0: "Optimistic", 70 1: "Pessimistic", 71 } 72 73 var TxnMode_value = map[string]int32{ 74 "Optimistic": 0, 75 "Pessimistic": 1, 76 } 77 78 func (x TxnMode) String() string { 79 return proto.EnumName(TxnMode_name, int32(x)) 80 } 81 82 func (TxnMode) EnumDescriptor() ([]byte, []int) { 83 return fileDescriptor_4f782e76b37adb9a, []int{1} 84 } 85 86 // TxnStatus transaction status 87 type TxnStatus int32 88 89 const ( 90 // Active is the state of transaction creation, in this state, can execute the 91 // transaction Read/Write/Commit/Rollback. 92 TxnStatus_Active TxnStatus = 0 93 // Prepared for distributed transactions across TNs, a 2pc commit is performed, 94 // and the prepared status means that the transaction on a TN was executed 95 // successfully in the first phase. 96 // 97 // Note that this status needs to be saved to the LogService. Once the first 98 // phase of a transaction is successful, data cannot be lost. 99 TxnStatus_Prepared TxnStatus = 1 100 // Committing for distributed transactions across TNs, once all TNs have completed 101 // the first phase, the transaction enters the Committing state and initiates an 102 // asynchronous process to handle the commit of temporary data. 103 // 104 // Note that when all TNs involved are in the prepared state, the distributed 105 // transaction can be considered committed because all data has been written 106 // successfully. The subsequent Committing process just explicitly converts these 107 // writes into committed data. 108 // 109 // Note that the state exists only in memory and is not persisted to the LogService. 110 // It can be restored through the Prepared state, if all(TN).Status == Prepared. 111 TxnStatus_Committing TxnStatus = 2 112 // Committed after the Committing phase has transformed all TN data involved into 113 // committed data, the status of the distributed transaction is explicitly recorded 114 // as Committed. 115 // 116 // Note that this status needs to be saved to the LogService 117 TxnStatus_Committed TxnStatus = 3 118 // Aborting a client initiating a Rollback call or a distributed transaction that has 119 // any error in the first phase will enter the Aborting state. This state starts an 120 // asynchronous task to clean up the temporary data written by the transaction. 121 // 122 // Note that the state exists only in memory and is not persisted to the LogService. 123 // It can be restored through the Prepared state, if Any(TN).Status != Prepared. 124 TxnStatus_Aborting TxnStatus = 4 125 // Aborted after the Aborting phase, all data involved in the TN is cleaned up and 126 // the transaction status is explicitly recorded as Aborted. 127 // 128 // Note that this status needs to be saved to the LogService 129 TxnStatus_Aborted TxnStatus = 5 130 ) 131 132 var TxnStatus_name = map[int32]string{ 133 0: "Active", 134 1: "Prepared", 135 2: "Committing", 136 3: "Committed", 137 4: "Aborting", 138 5: "Aborted", 139 } 140 141 var TxnStatus_value = map[string]int32{ 142 "Active": 0, 143 "Prepared": 1, 144 "Committing": 2, 145 "Committed": 3, 146 "Aborting": 4, 147 "Aborted": 5, 148 } 149 150 func (x TxnStatus) String() string { 151 return proto.EnumName(TxnStatus_name, int32(x)) 152 } 153 154 func (TxnStatus) EnumDescriptor() ([]byte, []int) { 155 return fileDescriptor_4f782e76b37adb9a, []int{2} 156 } 157 158 // TxnMethod transaction operations 159 type TxnMethod int32 160 161 const ( 162 // Read transaction read 163 TxnMethod_Read TxnMethod = 0 164 // Write transaction write 165 TxnMethod_Write TxnMethod = 1 166 // Commit commit transaction 167 TxnMethod_Commit TxnMethod = 2 168 // Rollback rollback transaction 169 TxnMethod_Rollback TxnMethod = 3 170 // Prepare when TN(Coordinator) receives a commit request from CN, it sends a prepare to 171 // each TN(TNShard) 172 TxnMethod_Prepare TxnMethod = 4 173 // GetStatus query the status of a transaction on a TN. When a TN encounters a transaction 174 // in the Prepared state, it needs to go to the TN(Coordinator) to query the status of the 175 // current transaction. When a TN encounters a transaction in the Prepared state during the 176 // recover, it needs to query the status of the transaction on each TN(TNShard) to determine 177 // if the transaction is committed. 178 TxnMethod_GetStatus TxnMethod = 5 179 // CommitTNShard after the 2pc transaction is committed, the temporary data on each TN needs 180 // to be explicitly converted to committed data. 181 TxnMethod_CommitTNShard TxnMethod = 6 182 // RollbackTNShard after the 2pc transaction is aborted, the temporary data on each TN needs 183 // to cleanup. 184 TxnMethod_RollbackTNShard TxnMethod = 7 185 // RemoveMedata Remove metadata for transactions on TNShard. For a 2pc distributed transaction, 186 // after all participating TNShards have Prepared successfully, the asynchronous commit process 187 // starts, sending CommitTNShard requests to all participating TNShards in parallel. After each 188 // TNShard has processed the CommitTNShard, the metadata of the transaction cannot be deleted 189 // immediately, otherwise when the transaction coordinator node is down and restarted, the commit 190 // status of the transaction cannot be determined in the recovery process, as it is possible that 191 // some participating TNShards cannot find the transaction information. 192 // 193 // TODO: needs to work with TAE's log compaction, not currently supported. 194 TxnMethod_RemoveMedata TxnMethod = 8 195 // DEBUG used to send debug request from cn to tn, and received response from tn to cn 196 TxnMethod_DEBUG TxnMethod = 9 197 ) 198 199 var TxnMethod_name = map[int32]string{ 200 0: "Read", 201 1: "Write", 202 2: "Commit", 203 3: "Rollback", 204 4: "Prepare", 205 5: "GetStatus", 206 6: "CommitTNShard", 207 7: "RollbackTNShard", 208 8: "RemoveMedata", 209 9: "DEBUG", 210 } 211 212 var TxnMethod_value = map[string]int32{ 213 "Read": 0, 214 "Write": 1, 215 "Commit": 2, 216 "Rollback": 3, 217 "Prepare": 4, 218 "GetStatus": 5, 219 "CommitTNShard": 6, 220 "RollbackTNShard": 7, 221 "RemoveMedata": 8, 222 "DEBUG": 9, 223 } 224 225 func (x TxnMethod) String() string { 226 return proto.EnumName(TxnMethod_name, int32(x)) 227 } 228 229 func (TxnMethod) EnumDescriptor() ([]byte, []int) { 230 return fileDescriptor_4f782e76b37adb9a, []int{3} 231 } 232 233 // TxnMeta transaction metadata 234 type TxnMeta struct { 235 // ID transaction id, generated at the CN node at the time of transaction creation, 236 // globally unique. 237 ID []byte `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` 238 // Status transaction status 239 Status TxnStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=txn.TxnStatus" json:"Status,omitempty"` 240 // SnapshotTS transaction read timestamp, generated at the CN node at the time of 241 // transaction creation. All data.TS < txn.SnapshotTS is visible for the current 242 // transaction. 243 SnapshotTS timestamp.Timestamp `protobuf:"bytes,3,opt,name=SnapshotTS,proto3" json:"SnapshotTS"` 244 // PreparedTS timestamp to complete the first phase of a 2pc commit transaction. 245 PreparedTS timestamp.Timestamp `protobuf:"bytes,4,opt,name=PreparedTS,proto3" json:"PreparedTS"` 246 // CommitTS transaction commit timestamp. For a 2pc transaction, commitTS = max(preparedTS). 247 CommitTS timestamp.Timestamp `protobuf:"bytes,5,opt,name=CommitTS,proto3" json:"CommitTS"` 248 // TNShards all TNShards that have written data. The first TN is the coordinator of the 249 // transaction 250 TNShards []metadata.TNShard `protobuf:"bytes,6,rep,name=TNShards,proto3" json:"TNShards"` 251 // LockTables For pessimistic transactions, LockTables record the bind metadata of the 252 // LockTable corresponding to the successful locking of the current transaction. This data 253 // is committed to the TN at Commit time, and the TN will check once if these bindings have 254 // changed, and if they have, the transaction will be rolled back. 255 LockTables []lock.LockTable `protobuf:"bytes,7,rep,name=LockTables,proto3" json:"LockTables"` 256 // TxnMode txn mode 257 Mode TxnMode `protobuf:"varint,8,opt,name=Mode,proto3,enum=txn.TxnMode" json:"Mode,omitempty"` 258 // TxnIsolation isolation 259 Isolation TxnIsolation `protobuf:"varint,9,opt,name=Isolation,proto3,enum=txn.TxnIsolation" json:"Isolation,omitempty"` 260 // Mirror is mirror is true, means the current txn is not created on current node. 261 Mirror bool `protobuf:"varint,10,opt,name=Mirror,proto3" json:"Mirror,omitempty"` 262 // LockService lock service's service address. Empty if is not pessimistic txn. 263 LockService string `protobuf:"bytes,11,opt,name=LockService,proto3" json:"LockService,omitempty"` 264 XXX_NoUnkeyedLiteral struct{} `json:"-"` 265 XXX_unrecognized []byte `json:"-"` 266 XXX_sizecache int32 `json:"-"` 267 } 268 269 func (m *TxnMeta) Reset() { *m = TxnMeta{} } 270 func (m *TxnMeta) String() string { return proto.CompactTextString(m) } 271 func (*TxnMeta) ProtoMessage() {} 272 func (*TxnMeta) Descriptor() ([]byte, []int) { 273 return fileDescriptor_4f782e76b37adb9a, []int{0} 274 } 275 func (m *TxnMeta) XXX_Unmarshal(b []byte) error { 276 return m.Unmarshal(b) 277 } 278 func (m *TxnMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 279 if deterministic { 280 return xxx_messageInfo_TxnMeta.Marshal(b, m, deterministic) 281 } else { 282 b = b[:cap(b)] 283 n, err := m.MarshalToSizedBuffer(b) 284 if err != nil { 285 return nil, err 286 } 287 return b[:n], nil 288 } 289 } 290 func (m *TxnMeta) XXX_Merge(src proto.Message) { 291 xxx_messageInfo_TxnMeta.Merge(m, src) 292 } 293 func (m *TxnMeta) XXX_Size() int { 294 return m.Size() 295 } 296 func (m *TxnMeta) XXX_DiscardUnknown() { 297 xxx_messageInfo_TxnMeta.DiscardUnknown(m) 298 } 299 300 var xxx_messageInfo_TxnMeta proto.InternalMessageInfo 301 302 func (m *TxnMeta) GetID() []byte { 303 if m != nil { 304 return m.ID 305 } 306 return nil 307 } 308 309 func (m *TxnMeta) GetStatus() TxnStatus { 310 if m != nil { 311 return m.Status 312 } 313 return TxnStatus_Active 314 } 315 316 func (m *TxnMeta) GetSnapshotTS() timestamp.Timestamp { 317 if m != nil { 318 return m.SnapshotTS 319 } 320 return timestamp.Timestamp{} 321 } 322 323 func (m *TxnMeta) GetPreparedTS() timestamp.Timestamp { 324 if m != nil { 325 return m.PreparedTS 326 } 327 return timestamp.Timestamp{} 328 } 329 330 func (m *TxnMeta) GetCommitTS() timestamp.Timestamp { 331 if m != nil { 332 return m.CommitTS 333 } 334 return timestamp.Timestamp{} 335 } 336 337 func (m *TxnMeta) GetTNShards() []metadata.TNShard { 338 if m != nil { 339 return m.TNShards 340 } 341 return nil 342 } 343 344 func (m *TxnMeta) GetLockTables() []lock.LockTable { 345 if m != nil { 346 return m.LockTables 347 } 348 return nil 349 } 350 351 func (m *TxnMeta) GetMode() TxnMode { 352 if m != nil { 353 return m.Mode 354 } 355 return TxnMode_Optimistic 356 } 357 358 func (m *TxnMeta) GetIsolation() TxnIsolation { 359 if m != nil { 360 return m.Isolation 361 } 362 return TxnIsolation_SI 363 } 364 365 func (m *TxnMeta) GetMirror() bool { 366 if m != nil { 367 return m.Mirror 368 } 369 return false 370 } 371 372 func (m *TxnMeta) GetLockService() string { 373 if m != nil { 374 return m.LockService 375 } 376 return "" 377 } 378 379 // CNTxnSnapshot snapshot of the cn txn operation. 380 type CNTxnSnapshot struct { 381 // ID txn id 382 Txn TxnMeta `protobuf:"bytes,1,opt,name=Txn,proto3" json:"Txn"` 383 // Deprecated: use TxnOptions 384 ReadyOnly bool `protobuf:"varint,2,opt,name=ReadyOnly,proto3" json:"ReadyOnly,omitempty"` 385 // Deprecated: use TxnOptions 386 EnableCacheWrite bool `protobuf:"varint,3,opt,name=EnableCacheWrite,proto3" json:"EnableCacheWrite,omitempty"` 387 // Deprecated: use TxnOptions 388 Disable1PCOpt bool `protobuf:"varint,4,opt,name=Disable1PCOpt,proto3" json:"Disable1PCOpt,omitempty"` 389 LockTables []lock.LockTable `protobuf:"bytes,5,rep,name=LockTables,proto3" json:"LockTables"` 390 Options TxnOptions `protobuf:"bytes,6,opt,name=Options,proto3" json:"Options"` 391 XXX_NoUnkeyedLiteral struct{} `json:"-"` 392 XXX_unrecognized []byte `json:"-"` 393 XXX_sizecache int32 `json:"-"` 394 } 395 396 func (m *CNTxnSnapshot) Reset() { *m = CNTxnSnapshot{} } 397 func (m *CNTxnSnapshot) String() string { return proto.CompactTextString(m) } 398 func (*CNTxnSnapshot) ProtoMessage() {} 399 func (*CNTxnSnapshot) Descriptor() ([]byte, []int) { 400 return fileDescriptor_4f782e76b37adb9a, []int{1} 401 } 402 func (m *CNTxnSnapshot) XXX_Unmarshal(b []byte) error { 403 return m.Unmarshal(b) 404 } 405 func (m *CNTxnSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 406 if deterministic { 407 return xxx_messageInfo_CNTxnSnapshot.Marshal(b, m, deterministic) 408 } else { 409 b = b[:cap(b)] 410 n, err := m.MarshalToSizedBuffer(b) 411 if err != nil { 412 return nil, err 413 } 414 return b[:n], nil 415 } 416 } 417 func (m *CNTxnSnapshot) XXX_Merge(src proto.Message) { 418 xxx_messageInfo_CNTxnSnapshot.Merge(m, src) 419 } 420 func (m *CNTxnSnapshot) XXX_Size() int { 421 return m.Size() 422 } 423 func (m *CNTxnSnapshot) XXX_DiscardUnknown() { 424 xxx_messageInfo_CNTxnSnapshot.DiscardUnknown(m) 425 } 426 427 var xxx_messageInfo_CNTxnSnapshot proto.InternalMessageInfo 428 429 func (m *CNTxnSnapshot) GetTxn() TxnMeta { 430 if m != nil { 431 return m.Txn 432 } 433 return TxnMeta{} 434 } 435 436 func (m *CNTxnSnapshot) GetReadyOnly() bool { 437 if m != nil { 438 return m.ReadyOnly 439 } 440 return false 441 } 442 443 func (m *CNTxnSnapshot) GetEnableCacheWrite() bool { 444 if m != nil { 445 return m.EnableCacheWrite 446 } 447 return false 448 } 449 450 func (m *CNTxnSnapshot) GetDisable1PCOpt() bool { 451 if m != nil { 452 return m.Disable1PCOpt 453 } 454 return false 455 } 456 457 func (m *CNTxnSnapshot) GetLockTables() []lock.LockTable { 458 if m != nil { 459 return m.LockTables 460 } 461 return nil 462 } 463 464 func (m *CNTxnSnapshot) GetOptions() TxnOptions { 465 if m != nil { 466 return m.Options 467 } 468 return TxnOptions{} 469 } 470 471 // CNOpRequest cn read/write request, CN -> TN. If data is written to more than one TN (>1) in a 472 // single transaction, then the transaction becomes a 2pc transaction. 473 type CNOpRequest struct { 474 // OpCode request operation type 475 OpCode uint32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` 476 // Payload the content of the request, TxnClient does not perceive the exact 477 // format and content 478 Payload []byte `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"` 479 // Target target to which the request was sent 480 Target metadata.TNShard `protobuf:"bytes,3,opt,name=Target,proto3" json:"Target"` 481 XXX_NoUnkeyedLiteral struct{} `json:"-"` 482 XXX_unrecognized []byte `json:"-"` 483 XXX_sizecache int32 `json:"-"` 484 } 485 486 func (m *CNOpRequest) Reset() { *m = CNOpRequest{} } 487 func (m *CNOpRequest) String() string { return proto.CompactTextString(m) } 488 func (*CNOpRequest) ProtoMessage() {} 489 func (*CNOpRequest) Descriptor() ([]byte, []int) { 490 return fileDescriptor_4f782e76b37adb9a, []int{2} 491 } 492 func (m *CNOpRequest) XXX_Unmarshal(b []byte) error { 493 return m.Unmarshal(b) 494 } 495 func (m *CNOpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 496 if deterministic { 497 return xxx_messageInfo_CNOpRequest.Marshal(b, m, deterministic) 498 } else { 499 b = b[:cap(b)] 500 n, err := m.MarshalToSizedBuffer(b) 501 if err != nil { 502 return nil, err 503 } 504 return b[:n], nil 505 } 506 } 507 func (m *CNOpRequest) XXX_Merge(src proto.Message) { 508 xxx_messageInfo_CNOpRequest.Merge(m, src) 509 } 510 func (m *CNOpRequest) XXX_Size() int { 511 return m.Size() 512 } 513 func (m *CNOpRequest) XXX_DiscardUnknown() { 514 xxx_messageInfo_CNOpRequest.DiscardUnknown(m) 515 } 516 517 var xxx_messageInfo_CNOpRequest proto.InternalMessageInfo 518 519 func (m *CNOpRequest) GetOpCode() uint32 { 520 if m != nil { 521 return m.OpCode 522 } 523 return 0 524 } 525 526 func (m *CNOpRequest) GetPayload() []byte { 527 if m != nil { 528 return m.Payload 529 } 530 return nil 531 } 532 533 func (m *CNOpRequest) GetTarget() metadata.TNShard { 534 if m != nil { 535 return m.Target 536 } 537 return metadata.TNShard{} 538 } 539 540 // CNOpResponse cn read/write response, TN -> CN. A request corresponds to a response. 541 type CNOpResponse struct { 542 // Payload response payload 543 Payload []byte `protobuf:"bytes,1,opt,name=Payload,proto3" json:"Payload,omitempty"` 544 XXX_NoUnkeyedLiteral struct{} `json:"-"` 545 XXX_unrecognized []byte `json:"-"` 546 XXX_sizecache int32 `json:"-"` 547 } 548 549 func (m *CNOpResponse) Reset() { *m = CNOpResponse{} } 550 func (m *CNOpResponse) String() string { return proto.CompactTextString(m) } 551 func (*CNOpResponse) ProtoMessage() {} 552 func (*CNOpResponse) Descriptor() ([]byte, []int) { 553 return fileDescriptor_4f782e76b37adb9a, []int{3} 554 } 555 func (m *CNOpResponse) XXX_Unmarshal(b []byte) error { 556 return m.Unmarshal(b) 557 } 558 func (m *CNOpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 559 if deterministic { 560 return xxx_messageInfo_CNOpResponse.Marshal(b, m, deterministic) 561 } else { 562 b = b[:cap(b)] 563 n, err := m.MarshalToSizedBuffer(b) 564 if err != nil { 565 return nil, err 566 } 567 return b[:n], nil 568 } 569 } 570 func (m *CNOpResponse) XXX_Merge(src proto.Message) { 571 xxx_messageInfo_CNOpResponse.Merge(m, src) 572 } 573 func (m *CNOpResponse) XXX_Size() int { 574 return m.Size() 575 } 576 func (m *CNOpResponse) XXX_DiscardUnknown() { 577 xxx_messageInfo_CNOpResponse.DiscardUnknown(m) 578 } 579 580 var xxx_messageInfo_CNOpResponse proto.InternalMessageInfo 581 582 func (m *CNOpResponse) GetPayload() []byte { 583 if m != nil { 584 return m.Payload 585 } 586 return nil 587 } 588 589 // TxnRequest transaction request. All requests for the transaction are made using TxnRequest, so that 590 // the codec and logical processing of the RPC can be unified. Specific requests are selected according 591 // to TxnMethod. 592 // 593 // Request flow of TxnRequest as below: 594 // 1. CN -> TN (TxnMethod.Read, TxnMethod.Write, TxnMethod.Commit, TxnMethod.Rollback) 595 // 2. TN -> TN (TxnMethod.Prepare, TxnMethod.GetStatus, TxnMethod.CommitTNShard, TxnMethod.RollbackTNShard, 596 // TxnMethod.RemoveMetadata) 597 type TxnRequest struct { 598 // RequestID request id 599 RequestID uint64 `protobuf:"varint,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"` 600 // Txn transaction metadata 601 Txn TxnMeta `protobuf:"bytes,2,opt,name=Txn,proto3" json:"Txn"` 602 // TxnMethod TxnRequest opCode, select the Request defined below according to TxnMethod. 603 Method TxnMethod `protobuf:"varint,3,opt,name=Method,proto3,enum=txn.TxnMethod" json:"Method,omitempty"` 604 // Flag request flag 605 Flag uint32 `protobuf:"varint,4,opt,name=Flag,proto3" json:"Flag,omitempty"` 606 // CNOpRequest corresponds to TxnMethod.Read, TxnMethod.Write 607 CNRequest *CNOpRequest `protobuf:"bytes,5,opt,name=CNRequest,proto3" json:"CNRequest,omitempty"` 608 // TxnCommitRequest corresponds to TxnMethod.Commit 609 CommitRequest *TxnCommitRequest `protobuf:"bytes,6,opt,name=CommitRequest,proto3" json:"CommitRequest,omitempty"` 610 // TxnRollbackRequest corresponds to TxnMethod.Rollback 611 RollbackRequest *TxnRollbackRequest `protobuf:"bytes,7,opt,name=RollbackRequest,proto3" json:"RollbackRequest,omitempty"` 612 // TxnPrepareRequest corresponds to TxnMethod.Prepare 613 PrepareRequest *TxnPrepareRequest `protobuf:"bytes,8,opt,name=PrepareRequest,proto3" json:"PrepareRequest,omitempty"` 614 // TxnGetStatusRequest corresponds to TxnMethod.GetStatus 615 GetStatusRequest *TxnGetStatusRequest `protobuf:"bytes,9,opt,name=GetStatusRequest,proto3" json:"GetStatusRequest,omitempty"` 616 // TxnCommitTNShardRequest corresponds to TxnMethod.CommitTNShard 617 CommitTNShardRequest *TxnCommitTNShardRequest `protobuf:"bytes,10,opt,name=CommitTNShardRequest,proto3" json:"CommitTNShardRequest,omitempty"` 618 // TxnRollbackTNShardRequest corresponds to TxnMethod.RollbackTNShard 619 RollbackTNShardRequest *TxnRollbackTNShardRequest `protobuf:"bytes,11,opt,name=RollbackTNShardRequest,proto3" json:"RollbackTNShardRequest,omitempty"` 620 // TxnRemoveMetadataRequest corresponds to TxnMethod.RemoveMetadata 621 RemoveMetadata *TxnRemoveMetadataRequest `protobuf:"bytes,12,opt,name=RemoveMetadata,proto3" json:"RemoveMetadata,omitempty"` 622 // TxnRequestOptions request options 623 Options *TxnRequestOptions `protobuf:"bytes,13,opt,name=Options,proto3" json:"Options,omitempty"` 624 XXX_NoUnkeyedLiteral struct{} `json:"-"` 625 XXX_unrecognized []byte `json:"-"` 626 XXX_sizecache int32 `json:"-"` 627 } 628 629 func (m *TxnRequest) Reset() { *m = TxnRequest{} } 630 func (m *TxnRequest) String() string { return proto.CompactTextString(m) } 631 func (*TxnRequest) ProtoMessage() {} 632 func (*TxnRequest) Descriptor() ([]byte, []int) { 633 return fileDescriptor_4f782e76b37adb9a, []int{4} 634 } 635 func (m *TxnRequest) XXX_Unmarshal(b []byte) error { 636 return m.Unmarshal(b) 637 } 638 func (m *TxnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 639 if deterministic { 640 return xxx_messageInfo_TxnRequest.Marshal(b, m, deterministic) 641 } else { 642 b = b[:cap(b)] 643 n, err := m.MarshalToSizedBuffer(b) 644 if err != nil { 645 return nil, err 646 } 647 return b[:n], nil 648 } 649 } 650 func (m *TxnRequest) XXX_Merge(src proto.Message) { 651 xxx_messageInfo_TxnRequest.Merge(m, src) 652 } 653 func (m *TxnRequest) XXX_Size() int { 654 return m.Size() 655 } 656 func (m *TxnRequest) XXX_DiscardUnknown() { 657 xxx_messageInfo_TxnRequest.DiscardUnknown(m) 658 } 659 660 var xxx_messageInfo_TxnRequest proto.InternalMessageInfo 661 662 func (m *TxnRequest) GetRequestID() uint64 { 663 if m != nil { 664 return m.RequestID 665 } 666 return 0 667 } 668 669 func (m *TxnRequest) GetTxn() TxnMeta { 670 if m != nil { 671 return m.Txn 672 } 673 return TxnMeta{} 674 } 675 676 func (m *TxnRequest) GetMethod() TxnMethod { 677 if m != nil { 678 return m.Method 679 } 680 return TxnMethod_Read 681 } 682 683 func (m *TxnRequest) GetFlag() uint32 { 684 if m != nil { 685 return m.Flag 686 } 687 return 0 688 } 689 690 func (m *TxnRequest) GetCNRequest() *CNOpRequest { 691 if m != nil { 692 return m.CNRequest 693 } 694 return nil 695 } 696 697 func (m *TxnRequest) GetCommitRequest() *TxnCommitRequest { 698 if m != nil { 699 return m.CommitRequest 700 } 701 return nil 702 } 703 704 func (m *TxnRequest) GetRollbackRequest() *TxnRollbackRequest { 705 if m != nil { 706 return m.RollbackRequest 707 } 708 return nil 709 } 710 711 func (m *TxnRequest) GetPrepareRequest() *TxnPrepareRequest { 712 if m != nil { 713 return m.PrepareRequest 714 } 715 return nil 716 } 717 718 func (m *TxnRequest) GetGetStatusRequest() *TxnGetStatusRequest { 719 if m != nil { 720 return m.GetStatusRequest 721 } 722 return nil 723 } 724 725 func (m *TxnRequest) GetCommitTNShardRequest() *TxnCommitTNShardRequest { 726 if m != nil { 727 return m.CommitTNShardRequest 728 } 729 return nil 730 } 731 732 func (m *TxnRequest) GetRollbackTNShardRequest() *TxnRollbackTNShardRequest { 733 if m != nil { 734 return m.RollbackTNShardRequest 735 } 736 return nil 737 } 738 739 func (m *TxnRequest) GetRemoveMetadata() *TxnRemoveMetadataRequest { 740 if m != nil { 741 return m.RemoveMetadata 742 } 743 return nil 744 } 745 746 func (m *TxnRequest) GetOptions() *TxnRequestOptions { 747 if m != nil { 748 return m.Options 749 } 750 return nil 751 } 752 753 // TxnRequestOptions txn options 754 type TxnRequestOptions struct { 755 // RetryCodes when TN processes TxnRequest and encounters the specified error, it needs to retry 756 // on the server side. Only read and write can retry. 757 RetryCodes []int32 `protobuf:"varint,1,rep,packed,name=RetryCodes,proto3" json:"RetryCodes,omitempty"` 758 // RetryInterval retry interval, default is 100ms. 759 RetryInterval int64 `protobuf:"varint,2,opt,name=RetryInterval,proto3" json:"RetryInterval,omitempty"` 760 XXX_NoUnkeyedLiteral struct{} `json:"-"` 761 XXX_unrecognized []byte `json:"-"` 762 XXX_sizecache int32 `json:"-"` 763 } 764 765 func (m *TxnRequestOptions) Reset() { *m = TxnRequestOptions{} } 766 func (m *TxnRequestOptions) String() string { return proto.CompactTextString(m) } 767 func (*TxnRequestOptions) ProtoMessage() {} 768 func (*TxnRequestOptions) Descriptor() ([]byte, []int) { 769 return fileDescriptor_4f782e76b37adb9a, []int{5} 770 } 771 func (m *TxnRequestOptions) XXX_Unmarshal(b []byte) error { 772 return m.Unmarshal(b) 773 } 774 func (m *TxnRequestOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 775 if deterministic { 776 return xxx_messageInfo_TxnRequestOptions.Marshal(b, m, deterministic) 777 } else { 778 b = b[:cap(b)] 779 n, err := m.MarshalToSizedBuffer(b) 780 if err != nil { 781 return nil, err 782 } 783 return b[:n], nil 784 } 785 } 786 func (m *TxnRequestOptions) XXX_Merge(src proto.Message) { 787 xxx_messageInfo_TxnRequestOptions.Merge(m, src) 788 } 789 func (m *TxnRequestOptions) XXX_Size() int { 790 return m.Size() 791 } 792 func (m *TxnRequestOptions) XXX_DiscardUnknown() { 793 xxx_messageInfo_TxnRequestOptions.DiscardUnknown(m) 794 } 795 796 var xxx_messageInfo_TxnRequestOptions proto.InternalMessageInfo 797 798 func (m *TxnRequestOptions) GetRetryCodes() []int32 { 799 if m != nil { 800 return m.RetryCodes 801 } 802 return nil 803 } 804 805 func (m *TxnRequestOptions) GetRetryInterval() int64 { 806 if m != nil { 807 return m.RetryInterval 808 } 809 return 0 810 } 811 812 // TxnResponse response of TxnRequest. 813 type TxnResponse struct { 814 // RequestID corresponding request id 815 RequestID uint64 `protobuf:"varint,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"` 816 // Txn transaction metadata. TxnResponse.TxnMeta and TxnRequest.TxnMeta may differ 817 // in that the node initiating the TxnRequest needs to process the returned TxnMeta, 818 // e.g. to determine whether the transaction is Aborted by the status of the returned 819 // TxnMeta. 820 Txn *TxnMeta `protobuf:"bytes,2,opt,name=Txn,proto3" json:"Txn,omitempty"` 821 // TxnMethod same as TxnRequest.TxnMethod 822 Method TxnMethod `protobuf:"varint,3,opt,name=Method,proto3,enum=txn.TxnMethod" json:"Method,omitempty"` 823 // Flag request flag, same as the corresponding request 824 Flag uint32 `protobuf:"varint,4,opt,name=Flag,proto3" json:"Flag,omitempty"` 825 // TxnError explicit error 826 TxnError *TxnError `protobuf:"bytes,5,opt,name=TxnError,proto3" json:"TxnError,omitempty"` 827 // CNOpResponse corresponds to TxnMethod.Read, TxnMethod.Write response 828 CNOpResponse *CNOpResponse `protobuf:"bytes,6,opt,name=CNOpResponse,proto3" json:"CNOpResponse,omitempty"` 829 // TxnCommitResponse corresponds to TxnMethod.Commit response 830 CommitResponse *TxnCommitResponse `protobuf:"bytes,7,opt,name=CommitResponse,proto3" json:"CommitResponse,omitempty"` 831 // TxnRollbackResponse corresponds to TxnMethod.Rollback response 832 RollbackResponse *TxnRollbackResponse `protobuf:"bytes,8,opt,name=RollbackResponse,proto3" json:"RollbackResponse,omitempty"` 833 // TxnPrepareResponse corresponds to TxnMethod.Prepare response 834 PrepareResponse *TxnPrepareResponse `protobuf:"bytes,9,opt,name=PrepareResponse,proto3" json:"PrepareResponse,omitempty"` 835 // TxnGetStatusResponse corresponds to TxnMethod.GetStatus response 836 GetStatusResponse *TxnGetStatusResponse `protobuf:"bytes,10,opt,name=GetStatusResponse,proto3" json:"GetStatusResponse,omitempty"` 837 // TxnCommitTNShardResponse corresponds to TxnMethod.CommitTNShard response 838 CommitTNShardResponse *TxnCommitTNShardResponse `protobuf:"bytes,11,opt,name=CommitTNShardResponse,proto3" json:"CommitTNShardResponse,omitempty"` 839 // TxnRollbackTNShardResponse corresponds to TxnMethod.RollbackTNShard response 840 RollbackTNShardResponse *TxnRollbackTNShardResponse `protobuf:"bytes,12,opt,name=RollbackTNShardResponse,proto3" json:"RollbackTNShardResponse,omitempty"` 841 // TxnRemoveMetadataResponse corresponds to TxnMethod.RemoveMetadata 842 RemoveMetadata *TxnRemoveMetadataResponse `protobuf:"bytes,13,opt,name=RemoveMetadata,proto3" json:"RemoveMetadata,omitempty"` 843 XXX_NoUnkeyedLiteral struct{} `json:"-"` 844 XXX_unrecognized []byte `json:"-"` 845 XXX_sizecache int32 `json:"-"` 846 } 847 848 func (m *TxnResponse) Reset() { *m = TxnResponse{} } 849 func (m *TxnResponse) String() string { return proto.CompactTextString(m) } 850 func (*TxnResponse) ProtoMessage() {} 851 func (*TxnResponse) Descriptor() ([]byte, []int) { 852 return fileDescriptor_4f782e76b37adb9a, []int{6} 853 } 854 func (m *TxnResponse) XXX_Unmarshal(b []byte) error { 855 return m.Unmarshal(b) 856 } 857 func (m *TxnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 858 if deterministic { 859 return xxx_messageInfo_TxnResponse.Marshal(b, m, deterministic) 860 } else { 861 b = b[:cap(b)] 862 n, err := m.MarshalToSizedBuffer(b) 863 if err != nil { 864 return nil, err 865 } 866 return b[:n], nil 867 } 868 } 869 func (m *TxnResponse) XXX_Merge(src proto.Message) { 870 xxx_messageInfo_TxnResponse.Merge(m, src) 871 } 872 func (m *TxnResponse) XXX_Size() int { 873 return m.Size() 874 } 875 func (m *TxnResponse) XXX_DiscardUnknown() { 876 xxx_messageInfo_TxnResponse.DiscardUnknown(m) 877 } 878 879 var xxx_messageInfo_TxnResponse proto.InternalMessageInfo 880 881 func (m *TxnResponse) GetRequestID() uint64 { 882 if m != nil { 883 return m.RequestID 884 } 885 return 0 886 } 887 888 func (m *TxnResponse) GetTxn() *TxnMeta { 889 if m != nil { 890 return m.Txn 891 } 892 return nil 893 } 894 895 func (m *TxnResponse) GetMethod() TxnMethod { 896 if m != nil { 897 return m.Method 898 } 899 return TxnMethod_Read 900 } 901 902 func (m *TxnResponse) GetFlag() uint32 { 903 if m != nil { 904 return m.Flag 905 } 906 return 0 907 } 908 909 func (m *TxnResponse) GetTxnError() *TxnError { 910 if m != nil { 911 return m.TxnError 912 } 913 return nil 914 } 915 916 func (m *TxnResponse) GetCNOpResponse() *CNOpResponse { 917 if m != nil { 918 return m.CNOpResponse 919 } 920 return nil 921 } 922 923 func (m *TxnResponse) GetCommitResponse() *TxnCommitResponse { 924 if m != nil { 925 return m.CommitResponse 926 } 927 return nil 928 } 929 930 func (m *TxnResponse) GetRollbackResponse() *TxnRollbackResponse { 931 if m != nil { 932 return m.RollbackResponse 933 } 934 return nil 935 } 936 937 func (m *TxnResponse) GetPrepareResponse() *TxnPrepareResponse { 938 if m != nil { 939 return m.PrepareResponse 940 } 941 return nil 942 } 943 944 func (m *TxnResponse) GetGetStatusResponse() *TxnGetStatusResponse { 945 if m != nil { 946 return m.GetStatusResponse 947 } 948 return nil 949 } 950 951 func (m *TxnResponse) GetCommitTNShardResponse() *TxnCommitTNShardResponse { 952 if m != nil { 953 return m.CommitTNShardResponse 954 } 955 return nil 956 } 957 958 func (m *TxnResponse) GetRollbackTNShardResponse() *TxnRollbackTNShardResponse { 959 if m != nil { 960 return m.RollbackTNShardResponse 961 } 962 return nil 963 } 964 965 func (m *TxnResponse) GetRemoveMetadata() *TxnRemoveMetadataResponse { 966 if m != nil { 967 return m.RemoveMetadata 968 } 969 return nil 970 } 971 972 // TxnCommitRequest CN sent the commit request to coordinator TN. 973 type TxnCommitRequest struct { 974 Payload []*TxnRequest `protobuf:"bytes,1,rep,name=Payload,proto3" json:"Payload,omitempty"` 975 Disable1PCOpt bool `protobuf:"varint,2,opt,name=Disable1PCOpt,proto3" json:"Disable1PCOpt,omitempty"` 976 XXX_NoUnkeyedLiteral struct{} `json:"-"` 977 XXX_unrecognized []byte `json:"-"` 978 XXX_sizecache int32 `json:"-"` 979 } 980 981 func (m *TxnCommitRequest) Reset() { *m = TxnCommitRequest{} } 982 func (m *TxnCommitRequest) String() string { return proto.CompactTextString(m) } 983 func (*TxnCommitRequest) ProtoMessage() {} 984 func (*TxnCommitRequest) Descriptor() ([]byte, []int) { 985 return fileDescriptor_4f782e76b37adb9a, []int{7} 986 } 987 func (m *TxnCommitRequest) XXX_Unmarshal(b []byte) error { 988 return m.Unmarshal(b) 989 } 990 func (m *TxnCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 991 if deterministic { 992 return xxx_messageInfo_TxnCommitRequest.Marshal(b, m, deterministic) 993 } else { 994 b = b[:cap(b)] 995 n, err := m.MarshalToSizedBuffer(b) 996 if err != nil { 997 return nil, err 998 } 999 return b[:n], nil 1000 } 1001 } 1002 func (m *TxnCommitRequest) XXX_Merge(src proto.Message) { 1003 xxx_messageInfo_TxnCommitRequest.Merge(m, src) 1004 } 1005 func (m *TxnCommitRequest) XXX_Size() int { 1006 return m.Size() 1007 } 1008 func (m *TxnCommitRequest) XXX_DiscardUnknown() { 1009 xxx_messageInfo_TxnCommitRequest.DiscardUnknown(m) 1010 } 1011 1012 var xxx_messageInfo_TxnCommitRequest proto.InternalMessageInfo 1013 1014 func (m *TxnCommitRequest) GetPayload() []*TxnRequest { 1015 if m != nil { 1016 return m.Payload 1017 } 1018 return nil 1019 } 1020 1021 func (m *TxnCommitRequest) GetDisable1PCOpt() bool { 1022 if m != nil { 1023 return m.Disable1PCOpt 1024 } 1025 return false 1026 } 1027 1028 // TxnCommitResponse response of TxnCommitRequest. 1029 type TxnCommitResponse struct { 1030 InvalidLockTables []uint64 `protobuf:"varint,1,rep,packed,name=InvalidLockTables,proto3" json:"InvalidLockTables,omitempty"` 1031 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1032 XXX_unrecognized []byte `json:"-"` 1033 XXX_sizecache int32 `json:"-"` 1034 } 1035 1036 func (m *TxnCommitResponse) Reset() { *m = TxnCommitResponse{} } 1037 func (m *TxnCommitResponse) String() string { return proto.CompactTextString(m) } 1038 func (*TxnCommitResponse) ProtoMessage() {} 1039 func (*TxnCommitResponse) Descriptor() ([]byte, []int) { 1040 return fileDescriptor_4f782e76b37adb9a, []int{8} 1041 } 1042 func (m *TxnCommitResponse) XXX_Unmarshal(b []byte) error { 1043 return m.Unmarshal(b) 1044 } 1045 func (m *TxnCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1046 if deterministic { 1047 return xxx_messageInfo_TxnCommitResponse.Marshal(b, m, deterministic) 1048 } else { 1049 b = b[:cap(b)] 1050 n, err := m.MarshalToSizedBuffer(b) 1051 if err != nil { 1052 return nil, err 1053 } 1054 return b[:n], nil 1055 } 1056 } 1057 func (m *TxnCommitResponse) XXX_Merge(src proto.Message) { 1058 xxx_messageInfo_TxnCommitResponse.Merge(m, src) 1059 } 1060 func (m *TxnCommitResponse) XXX_Size() int { 1061 return m.Size() 1062 } 1063 func (m *TxnCommitResponse) XXX_DiscardUnknown() { 1064 xxx_messageInfo_TxnCommitResponse.DiscardUnknown(m) 1065 } 1066 1067 var xxx_messageInfo_TxnCommitResponse proto.InternalMessageInfo 1068 1069 func (m *TxnCommitResponse) GetInvalidLockTables() []uint64 { 1070 if m != nil { 1071 return m.InvalidLockTables 1072 } 1073 return nil 1074 } 1075 1076 // TxnCommitRequest CN sent the rollback request to coordinator TN. 1077 type TxnRollbackRequest struct { 1078 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1079 XXX_unrecognized []byte `json:"-"` 1080 XXX_sizecache int32 `json:"-"` 1081 } 1082 1083 func (m *TxnRollbackRequest) Reset() { *m = TxnRollbackRequest{} } 1084 func (m *TxnRollbackRequest) String() string { return proto.CompactTextString(m) } 1085 func (*TxnRollbackRequest) ProtoMessage() {} 1086 func (*TxnRollbackRequest) Descriptor() ([]byte, []int) { 1087 return fileDescriptor_4f782e76b37adb9a, []int{9} 1088 } 1089 func (m *TxnRollbackRequest) XXX_Unmarshal(b []byte) error { 1090 return m.Unmarshal(b) 1091 } 1092 func (m *TxnRollbackRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1093 if deterministic { 1094 return xxx_messageInfo_TxnRollbackRequest.Marshal(b, m, deterministic) 1095 } else { 1096 b = b[:cap(b)] 1097 n, err := m.MarshalToSizedBuffer(b) 1098 if err != nil { 1099 return nil, err 1100 } 1101 return b[:n], nil 1102 } 1103 } 1104 func (m *TxnRollbackRequest) XXX_Merge(src proto.Message) { 1105 xxx_messageInfo_TxnRollbackRequest.Merge(m, src) 1106 } 1107 func (m *TxnRollbackRequest) XXX_Size() int { 1108 return m.Size() 1109 } 1110 func (m *TxnRollbackRequest) XXX_DiscardUnknown() { 1111 xxx_messageInfo_TxnRollbackRequest.DiscardUnknown(m) 1112 } 1113 1114 var xxx_messageInfo_TxnRollbackRequest proto.InternalMessageInfo 1115 1116 // TxnRollbackResponse response of TxnRollbackRequest. 1117 type TxnRollbackResponse struct { 1118 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1119 XXX_unrecognized []byte `json:"-"` 1120 XXX_sizecache int32 `json:"-"` 1121 } 1122 1123 func (m *TxnRollbackResponse) Reset() { *m = TxnRollbackResponse{} } 1124 func (m *TxnRollbackResponse) String() string { return proto.CompactTextString(m) } 1125 func (*TxnRollbackResponse) ProtoMessage() {} 1126 func (*TxnRollbackResponse) Descriptor() ([]byte, []int) { 1127 return fileDescriptor_4f782e76b37adb9a, []int{10} 1128 } 1129 func (m *TxnRollbackResponse) XXX_Unmarshal(b []byte) error { 1130 return m.Unmarshal(b) 1131 } 1132 func (m *TxnRollbackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1133 if deterministic { 1134 return xxx_messageInfo_TxnRollbackResponse.Marshal(b, m, deterministic) 1135 } else { 1136 b = b[:cap(b)] 1137 n, err := m.MarshalToSizedBuffer(b) 1138 if err != nil { 1139 return nil, err 1140 } 1141 return b[:n], nil 1142 } 1143 } 1144 func (m *TxnRollbackResponse) XXX_Merge(src proto.Message) { 1145 xxx_messageInfo_TxnRollbackResponse.Merge(m, src) 1146 } 1147 func (m *TxnRollbackResponse) XXX_Size() int { 1148 return m.Size() 1149 } 1150 func (m *TxnRollbackResponse) XXX_DiscardUnknown() { 1151 xxx_messageInfo_TxnRollbackResponse.DiscardUnknown(m) 1152 } 1153 1154 var xxx_messageInfo_TxnRollbackResponse proto.InternalMessageInfo 1155 1156 // TxnPrepareRequest when a TN(coordinator) receives a Commit request from a CN, if 1157 // more than one TN is involved, the 2PC commit process is enabled and the first phase 1158 // is to send prepare requests to all TNs. 1159 type TxnPrepareRequest struct { 1160 // TNShard prepare TN 1161 TNShard metadata.TNShard `protobuf:"bytes,1,opt,name=TNShard,proto3" json:"TNShard"` 1162 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1163 XXX_unrecognized []byte `json:"-"` 1164 XXX_sizecache int32 `json:"-"` 1165 } 1166 1167 func (m *TxnPrepareRequest) Reset() { *m = TxnPrepareRequest{} } 1168 func (m *TxnPrepareRequest) String() string { return proto.CompactTextString(m) } 1169 func (*TxnPrepareRequest) ProtoMessage() {} 1170 func (*TxnPrepareRequest) Descriptor() ([]byte, []int) { 1171 return fileDescriptor_4f782e76b37adb9a, []int{11} 1172 } 1173 func (m *TxnPrepareRequest) XXX_Unmarshal(b []byte) error { 1174 return m.Unmarshal(b) 1175 } 1176 func (m *TxnPrepareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1177 if deterministic { 1178 return xxx_messageInfo_TxnPrepareRequest.Marshal(b, m, deterministic) 1179 } else { 1180 b = b[:cap(b)] 1181 n, err := m.MarshalToSizedBuffer(b) 1182 if err != nil { 1183 return nil, err 1184 } 1185 return b[:n], nil 1186 } 1187 } 1188 func (m *TxnPrepareRequest) XXX_Merge(src proto.Message) { 1189 xxx_messageInfo_TxnPrepareRequest.Merge(m, src) 1190 } 1191 func (m *TxnPrepareRequest) XXX_Size() int { 1192 return m.Size() 1193 } 1194 func (m *TxnPrepareRequest) XXX_DiscardUnknown() { 1195 xxx_messageInfo_TxnPrepareRequest.DiscardUnknown(m) 1196 } 1197 1198 var xxx_messageInfo_TxnPrepareRequest proto.InternalMessageInfo 1199 1200 func (m *TxnPrepareRequest) GetTNShard() metadata.TNShard { 1201 if m != nil { 1202 return m.TNShard 1203 } 1204 return metadata.TNShard{} 1205 } 1206 1207 // TxnPrepareResponse response of TxnPrepareRequest 1208 type TxnPrepareResponse struct { 1209 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1210 XXX_unrecognized []byte `json:"-"` 1211 XXX_sizecache int32 `json:"-"` 1212 } 1213 1214 func (m *TxnPrepareResponse) Reset() { *m = TxnPrepareResponse{} } 1215 func (m *TxnPrepareResponse) String() string { return proto.CompactTextString(m) } 1216 func (*TxnPrepareResponse) ProtoMessage() {} 1217 func (*TxnPrepareResponse) Descriptor() ([]byte, []int) { 1218 return fileDescriptor_4f782e76b37adb9a, []int{12} 1219 } 1220 func (m *TxnPrepareResponse) XXX_Unmarshal(b []byte) error { 1221 return m.Unmarshal(b) 1222 } 1223 func (m *TxnPrepareResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1224 if deterministic { 1225 return xxx_messageInfo_TxnPrepareResponse.Marshal(b, m, deterministic) 1226 } else { 1227 b = b[:cap(b)] 1228 n, err := m.MarshalToSizedBuffer(b) 1229 if err != nil { 1230 return nil, err 1231 } 1232 return b[:n], nil 1233 } 1234 } 1235 func (m *TxnPrepareResponse) XXX_Merge(src proto.Message) { 1236 xxx_messageInfo_TxnPrepareResponse.Merge(m, src) 1237 } 1238 func (m *TxnPrepareResponse) XXX_Size() int { 1239 return m.Size() 1240 } 1241 func (m *TxnPrepareResponse) XXX_DiscardUnknown() { 1242 xxx_messageInfo_TxnPrepareResponse.DiscardUnknown(m) 1243 } 1244 1245 var xxx_messageInfo_TxnPrepareResponse proto.InternalMessageInfo 1246 1247 // TxnGetStatusRequest query the status of a transaction on TN 1248 type TxnGetStatusRequest struct { 1249 // TNShard target TN 1250 TNShard metadata.TNShard `protobuf:"bytes,1,opt,name=TNShard,proto3" json:"TNShard"` 1251 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1252 XXX_unrecognized []byte `json:"-"` 1253 XXX_sizecache int32 `json:"-"` 1254 } 1255 1256 func (m *TxnGetStatusRequest) Reset() { *m = TxnGetStatusRequest{} } 1257 func (m *TxnGetStatusRequest) String() string { return proto.CompactTextString(m) } 1258 func (*TxnGetStatusRequest) ProtoMessage() {} 1259 func (*TxnGetStatusRequest) Descriptor() ([]byte, []int) { 1260 return fileDescriptor_4f782e76b37adb9a, []int{13} 1261 } 1262 func (m *TxnGetStatusRequest) XXX_Unmarshal(b []byte) error { 1263 return m.Unmarshal(b) 1264 } 1265 func (m *TxnGetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1266 if deterministic { 1267 return xxx_messageInfo_TxnGetStatusRequest.Marshal(b, m, deterministic) 1268 } else { 1269 b = b[:cap(b)] 1270 n, err := m.MarshalToSizedBuffer(b) 1271 if err != nil { 1272 return nil, err 1273 } 1274 return b[:n], nil 1275 } 1276 } 1277 func (m *TxnGetStatusRequest) XXX_Merge(src proto.Message) { 1278 xxx_messageInfo_TxnGetStatusRequest.Merge(m, src) 1279 } 1280 func (m *TxnGetStatusRequest) XXX_Size() int { 1281 return m.Size() 1282 } 1283 func (m *TxnGetStatusRequest) XXX_DiscardUnknown() { 1284 xxx_messageInfo_TxnGetStatusRequest.DiscardUnknown(m) 1285 } 1286 1287 var xxx_messageInfo_TxnGetStatusRequest proto.InternalMessageInfo 1288 1289 func (m *TxnGetStatusRequest) GetTNShard() metadata.TNShard { 1290 if m != nil { 1291 return m.TNShard 1292 } 1293 return metadata.TNShard{} 1294 } 1295 1296 // TxnGetStatusResponse response of TxnGetStatusRequest 1297 type TxnGetStatusResponse struct { 1298 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1299 XXX_unrecognized []byte `json:"-"` 1300 XXX_sizecache int32 `json:"-"` 1301 } 1302 1303 func (m *TxnGetStatusResponse) Reset() { *m = TxnGetStatusResponse{} } 1304 func (m *TxnGetStatusResponse) String() string { return proto.CompactTextString(m) } 1305 func (*TxnGetStatusResponse) ProtoMessage() {} 1306 func (*TxnGetStatusResponse) Descriptor() ([]byte, []int) { 1307 return fileDescriptor_4f782e76b37adb9a, []int{14} 1308 } 1309 func (m *TxnGetStatusResponse) XXX_Unmarshal(b []byte) error { 1310 return m.Unmarshal(b) 1311 } 1312 func (m *TxnGetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1313 if deterministic { 1314 return xxx_messageInfo_TxnGetStatusResponse.Marshal(b, m, deterministic) 1315 } else { 1316 b = b[:cap(b)] 1317 n, err := m.MarshalToSizedBuffer(b) 1318 if err != nil { 1319 return nil, err 1320 } 1321 return b[:n], nil 1322 } 1323 } 1324 func (m *TxnGetStatusResponse) XXX_Merge(src proto.Message) { 1325 xxx_messageInfo_TxnGetStatusResponse.Merge(m, src) 1326 } 1327 func (m *TxnGetStatusResponse) XXX_Size() int { 1328 return m.Size() 1329 } 1330 func (m *TxnGetStatusResponse) XXX_DiscardUnknown() { 1331 xxx_messageInfo_TxnGetStatusResponse.DiscardUnknown(m) 1332 } 1333 1334 var xxx_messageInfo_TxnGetStatusResponse proto.InternalMessageInfo 1335 1336 // TxnCommitTNShardRequest commit txn on TNShard. Data needs to be written to the 1337 // LogService. 1338 type TxnCommitTNShardRequest struct { 1339 // TNShard target TN 1340 TNShard metadata.TNShard `protobuf:"bytes,1,opt,name=TNShard,proto3" json:"TNShard"` 1341 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1342 XXX_unrecognized []byte `json:"-"` 1343 XXX_sizecache int32 `json:"-"` 1344 } 1345 1346 func (m *TxnCommitTNShardRequest) Reset() { *m = TxnCommitTNShardRequest{} } 1347 func (m *TxnCommitTNShardRequest) String() string { return proto.CompactTextString(m) } 1348 func (*TxnCommitTNShardRequest) ProtoMessage() {} 1349 func (*TxnCommitTNShardRequest) Descriptor() ([]byte, []int) { 1350 return fileDescriptor_4f782e76b37adb9a, []int{15} 1351 } 1352 func (m *TxnCommitTNShardRequest) XXX_Unmarshal(b []byte) error { 1353 return m.Unmarshal(b) 1354 } 1355 func (m *TxnCommitTNShardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1356 if deterministic { 1357 return xxx_messageInfo_TxnCommitTNShardRequest.Marshal(b, m, deterministic) 1358 } else { 1359 b = b[:cap(b)] 1360 n, err := m.MarshalToSizedBuffer(b) 1361 if err != nil { 1362 return nil, err 1363 } 1364 return b[:n], nil 1365 } 1366 } 1367 func (m *TxnCommitTNShardRequest) XXX_Merge(src proto.Message) { 1368 xxx_messageInfo_TxnCommitTNShardRequest.Merge(m, src) 1369 } 1370 func (m *TxnCommitTNShardRequest) XXX_Size() int { 1371 return m.Size() 1372 } 1373 func (m *TxnCommitTNShardRequest) XXX_DiscardUnknown() { 1374 xxx_messageInfo_TxnCommitTNShardRequest.DiscardUnknown(m) 1375 } 1376 1377 var xxx_messageInfo_TxnCommitTNShardRequest proto.InternalMessageInfo 1378 1379 func (m *TxnCommitTNShardRequest) GetTNShard() metadata.TNShard { 1380 if m != nil { 1381 return m.TNShard 1382 } 1383 return metadata.TNShard{} 1384 } 1385 1386 // TxnCommitTNShardResponse response of TxnCommitTNShardRequest 1387 type TxnCommitTNShardResponse struct { 1388 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1389 XXX_unrecognized []byte `json:"-"` 1390 XXX_sizecache int32 `json:"-"` 1391 } 1392 1393 func (m *TxnCommitTNShardResponse) Reset() { *m = TxnCommitTNShardResponse{} } 1394 func (m *TxnCommitTNShardResponse) String() string { return proto.CompactTextString(m) } 1395 func (*TxnCommitTNShardResponse) ProtoMessage() {} 1396 func (*TxnCommitTNShardResponse) Descriptor() ([]byte, []int) { 1397 return fileDescriptor_4f782e76b37adb9a, []int{16} 1398 } 1399 func (m *TxnCommitTNShardResponse) XXX_Unmarshal(b []byte) error { 1400 return m.Unmarshal(b) 1401 } 1402 func (m *TxnCommitTNShardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1403 if deterministic { 1404 return xxx_messageInfo_TxnCommitTNShardResponse.Marshal(b, m, deterministic) 1405 } else { 1406 b = b[:cap(b)] 1407 n, err := m.MarshalToSizedBuffer(b) 1408 if err != nil { 1409 return nil, err 1410 } 1411 return b[:n], nil 1412 } 1413 } 1414 func (m *TxnCommitTNShardResponse) XXX_Merge(src proto.Message) { 1415 xxx_messageInfo_TxnCommitTNShardResponse.Merge(m, src) 1416 } 1417 func (m *TxnCommitTNShardResponse) XXX_Size() int { 1418 return m.Size() 1419 } 1420 func (m *TxnCommitTNShardResponse) XXX_DiscardUnknown() { 1421 xxx_messageInfo_TxnCommitTNShardResponse.DiscardUnknown(m) 1422 } 1423 1424 var xxx_messageInfo_TxnCommitTNShardResponse proto.InternalMessageInfo 1425 1426 // TxnRollbackTNShardRequest rollback txn on TNShard 1427 type TxnRollbackTNShardRequest struct { 1428 // TNShard target TN 1429 TNShard metadata.TNShard `protobuf:"bytes,1,opt,name=TNShard,proto3" json:"TNShard"` 1430 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1431 XXX_unrecognized []byte `json:"-"` 1432 XXX_sizecache int32 `json:"-"` 1433 } 1434 1435 func (m *TxnRollbackTNShardRequest) Reset() { *m = TxnRollbackTNShardRequest{} } 1436 func (m *TxnRollbackTNShardRequest) String() string { return proto.CompactTextString(m) } 1437 func (*TxnRollbackTNShardRequest) ProtoMessage() {} 1438 func (*TxnRollbackTNShardRequest) Descriptor() ([]byte, []int) { 1439 return fileDescriptor_4f782e76b37adb9a, []int{17} 1440 } 1441 func (m *TxnRollbackTNShardRequest) XXX_Unmarshal(b []byte) error { 1442 return m.Unmarshal(b) 1443 } 1444 func (m *TxnRollbackTNShardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1445 if deterministic { 1446 return xxx_messageInfo_TxnRollbackTNShardRequest.Marshal(b, m, deterministic) 1447 } else { 1448 b = b[:cap(b)] 1449 n, err := m.MarshalToSizedBuffer(b) 1450 if err != nil { 1451 return nil, err 1452 } 1453 return b[:n], nil 1454 } 1455 } 1456 func (m *TxnRollbackTNShardRequest) XXX_Merge(src proto.Message) { 1457 xxx_messageInfo_TxnRollbackTNShardRequest.Merge(m, src) 1458 } 1459 func (m *TxnRollbackTNShardRequest) XXX_Size() int { 1460 return m.Size() 1461 } 1462 func (m *TxnRollbackTNShardRequest) XXX_DiscardUnknown() { 1463 xxx_messageInfo_TxnRollbackTNShardRequest.DiscardUnknown(m) 1464 } 1465 1466 var xxx_messageInfo_TxnRollbackTNShardRequest proto.InternalMessageInfo 1467 1468 func (m *TxnRollbackTNShardRequest) GetTNShard() metadata.TNShard { 1469 if m != nil { 1470 return m.TNShard 1471 } 1472 return metadata.TNShard{} 1473 } 1474 1475 // TxnRollbackTNShardResponse response of TxnRollbackTNShardRequest 1476 type TxnRollbackTNShardResponse struct { 1477 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1478 XXX_unrecognized []byte `json:"-"` 1479 XXX_sizecache int32 `json:"-"` 1480 } 1481 1482 func (m *TxnRollbackTNShardResponse) Reset() { *m = TxnRollbackTNShardResponse{} } 1483 func (m *TxnRollbackTNShardResponse) String() string { return proto.CompactTextString(m) } 1484 func (*TxnRollbackTNShardResponse) ProtoMessage() {} 1485 func (*TxnRollbackTNShardResponse) Descriptor() ([]byte, []int) { 1486 return fileDescriptor_4f782e76b37adb9a, []int{18} 1487 } 1488 func (m *TxnRollbackTNShardResponse) XXX_Unmarshal(b []byte) error { 1489 return m.Unmarshal(b) 1490 } 1491 func (m *TxnRollbackTNShardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1492 if deterministic { 1493 return xxx_messageInfo_TxnRollbackTNShardResponse.Marshal(b, m, deterministic) 1494 } else { 1495 b = b[:cap(b)] 1496 n, err := m.MarshalToSizedBuffer(b) 1497 if err != nil { 1498 return nil, err 1499 } 1500 return b[:n], nil 1501 } 1502 } 1503 func (m *TxnRollbackTNShardResponse) XXX_Merge(src proto.Message) { 1504 xxx_messageInfo_TxnRollbackTNShardResponse.Merge(m, src) 1505 } 1506 func (m *TxnRollbackTNShardResponse) XXX_Size() int { 1507 return m.Size() 1508 } 1509 func (m *TxnRollbackTNShardResponse) XXX_DiscardUnknown() { 1510 xxx_messageInfo_TxnRollbackTNShardResponse.DiscardUnknown(m) 1511 } 1512 1513 var xxx_messageInfo_TxnRollbackTNShardResponse proto.InternalMessageInfo 1514 1515 // TxnRemoveMetadataRequest remove txn metadata on TNShard 1516 type TxnRemoveMetadataRequest struct { 1517 // TNShard target TN 1518 TNShard metadata.TNShard `protobuf:"bytes,1,opt,name=TNShard,proto3" json:"TNShard"` 1519 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1520 XXX_unrecognized []byte `json:"-"` 1521 XXX_sizecache int32 `json:"-"` 1522 } 1523 1524 func (m *TxnRemoveMetadataRequest) Reset() { *m = TxnRemoveMetadataRequest{} } 1525 func (m *TxnRemoveMetadataRequest) String() string { return proto.CompactTextString(m) } 1526 func (*TxnRemoveMetadataRequest) ProtoMessage() {} 1527 func (*TxnRemoveMetadataRequest) Descriptor() ([]byte, []int) { 1528 return fileDescriptor_4f782e76b37adb9a, []int{19} 1529 } 1530 func (m *TxnRemoveMetadataRequest) XXX_Unmarshal(b []byte) error { 1531 return m.Unmarshal(b) 1532 } 1533 func (m *TxnRemoveMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1534 if deterministic { 1535 return xxx_messageInfo_TxnRemoveMetadataRequest.Marshal(b, m, deterministic) 1536 } else { 1537 b = b[:cap(b)] 1538 n, err := m.MarshalToSizedBuffer(b) 1539 if err != nil { 1540 return nil, err 1541 } 1542 return b[:n], nil 1543 } 1544 } 1545 func (m *TxnRemoveMetadataRequest) XXX_Merge(src proto.Message) { 1546 xxx_messageInfo_TxnRemoveMetadataRequest.Merge(m, src) 1547 } 1548 func (m *TxnRemoveMetadataRequest) XXX_Size() int { 1549 return m.Size() 1550 } 1551 func (m *TxnRemoveMetadataRequest) XXX_DiscardUnknown() { 1552 xxx_messageInfo_TxnRemoveMetadataRequest.DiscardUnknown(m) 1553 } 1554 1555 var xxx_messageInfo_TxnRemoveMetadataRequest proto.InternalMessageInfo 1556 1557 func (m *TxnRemoveMetadataRequest) GetTNShard() metadata.TNShard { 1558 if m != nil { 1559 return m.TNShard 1560 } 1561 return metadata.TNShard{} 1562 } 1563 1564 // TxnRemoveMetadataResponse response of TxnRemoveMetadataRequest 1565 type TxnRemoveMetadataResponse struct { 1566 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1567 XXX_unrecognized []byte `json:"-"` 1568 XXX_sizecache int32 `json:"-"` 1569 } 1570 1571 func (m *TxnRemoveMetadataResponse) Reset() { *m = TxnRemoveMetadataResponse{} } 1572 func (m *TxnRemoveMetadataResponse) String() string { return proto.CompactTextString(m) } 1573 func (*TxnRemoveMetadataResponse) ProtoMessage() {} 1574 func (*TxnRemoveMetadataResponse) Descriptor() ([]byte, []int) { 1575 return fileDescriptor_4f782e76b37adb9a, []int{20} 1576 } 1577 func (m *TxnRemoveMetadataResponse) XXX_Unmarshal(b []byte) error { 1578 return m.Unmarshal(b) 1579 } 1580 func (m *TxnRemoveMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1581 if deterministic { 1582 return xxx_messageInfo_TxnRemoveMetadataResponse.Marshal(b, m, deterministic) 1583 } else { 1584 b = b[:cap(b)] 1585 n, err := m.MarshalToSizedBuffer(b) 1586 if err != nil { 1587 return nil, err 1588 } 1589 return b[:n], nil 1590 } 1591 } 1592 func (m *TxnRemoveMetadataResponse) XXX_Merge(src proto.Message) { 1593 xxx_messageInfo_TxnRemoveMetadataResponse.Merge(m, src) 1594 } 1595 func (m *TxnRemoveMetadataResponse) XXX_Size() int { 1596 return m.Size() 1597 } 1598 func (m *TxnRemoveMetadataResponse) XXX_DiscardUnknown() { 1599 xxx_messageInfo_TxnRemoveMetadataResponse.DiscardUnknown(m) 1600 } 1601 1602 var xxx_messageInfo_TxnRemoveMetadataResponse proto.InternalMessageInfo 1603 1604 // TxnError all explicit errors in transaction operations. 1605 type TxnError struct { 1606 // Code moerr code, used to special error handle without unmarshal moerr 1607 Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` 1608 // Error we use this field to send moerr from tn to cn. Set with 1609 // moerr.MarshalBinary, and use moerr.UnmarshalBinary to restore 1610 // moerr. 1611 Error []byte `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` 1612 // TxnErrCode is a internal err code in the txn framework and used to indicate 1613 // what transaction operation failed. Usually this value is the same as the value 1614 // of Code, except for the error returned by the interface call to TxnStorage. 1615 // Because the types of errors returned by TxnStorage's interface are unknown to the 1616 // transaction framework, it is necessary to use a code for the interface call to uniformly 1617 // replace these error codes. 1618 TxnErrCode uint32 `protobuf:"varint,3,opt,name=TxnErrCode,proto3" json:"TxnErrCode,omitempty"` 1619 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1620 XXX_unrecognized []byte `json:"-"` 1621 XXX_sizecache int32 `json:"-"` 1622 } 1623 1624 func (m *TxnError) Reset() { *m = TxnError{} } 1625 func (m *TxnError) String() string { return proto.CompactTextString(m) } 1626 func (*TxnError) ProtoMessage() {} 1627 func (*TxnError) Descriptor() ([]byte, []int) { 1628 return fileDescriptor_4f782e76b37adb9a, []int{21} 1629 } 1630 func (m *TxnError) XXX_Unmarshal(b []byte) error { 1631 return m.Unmarshal(b) 1632 } 1633 func (m *TxnError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1634 if deterministic { 1635 return xxx_messageInfo_TxnError.Marshal(b, m, deterministic) 1636 } else { 1637 b = b[:cap(b)] 1638 n, err := m.MarshalToSizedBuffer(b) 1639 if err != nil { 1640 return nil, err 1641 } 1642 return b[:n], nil 1643 } 1644 } 1645 func (m *TxnError) XXX_Merge(src proto.Message) { 1646 xxx_messageInfo_TxnError.Merge(m, src) 1647 } 1648 func (m *TxnError) XXX_Size() int { 1649 return m.Size() 1650 } 1651 func (m *TxnError) XXX_DiscardUnknown() { 1652 xxx_messageInfo_TxnError.DiscardUnknown(m) 1653 } 1654 1655 var xxx_messageInfo_TxnError proto.InternalMessageInfo 1656 1657 func (m *TxnError) GetCode() uint32 { 1658 if m != nil { 1659 return m.Code 1660 } 1661 return 0 1662 } 1663 1664 func (m *TxnError) GetError() []byte { 1665 if m != nil { 1666 return m.Error 1667 } 1668 return nil 1669 } 1670 1671 func (m *TxnError) GetTxnErrCode() uint32 { 1672 if m != nil { 1673 return m.TxnErrCode 1674 } 1675 return 0 1676 } 1677 1678 type TxnOptions struct { 1679 Features uint32 `protobuf:"varint,1,opt,name=Features,proto3" json:"Features,omitempty"` 1680 CN string `protobuf:"bytes,2,opt,name=CN,proto3" json:"CN,omitempty"` 1681 SessionID string `protobuf:"bytes,3,opt,name=SessionID,proto3" json:"SessionID,omitempty"` 1682 AccountID uint32 `protobuf:"varint,4,opt,name=AccountID,proto3" json:"AccountID,omitempty"` 1683 ConnectionID uint32 `protobuf:"varint,5,opt,name=ConnectionID,proto3" json:"ConnectionID,omitempty"` 1684 UserName string `protobuf:"bytes,6,opt,name=UserName,proto3" json:"UserName,omitempty"` 1685 SkipLockTables []uint64 `protobuf:"varint,7,rep,packed,name=SkipLockTables,proto3" json:"SkipLockTables,omitempty"` 1686 SkipLockTableModes []lock.LockMode `protobuf:"varint,8,rep,packed,name=SkipLockTableModes,proto3,enum=lock.LockMode" json:"SkipLockTableModes,omitempty"` 1687 Counter string `protobuf:"bytes,9,opt,name=counter,proto3" json:"counter,omitempty"` 1688 SessionInfo string `protobuf:"bytes,10,opt,name=sessionInfo,proto3" json:"sessionInfo,omitempty"` 1689 InRunSql bool `protobuf:"varint,11,opt,name=inRunSql,proto3" json:"inRunSql,omitempty"` 1690 InCommit bool `protobuf:"varint,12,opt,name=inCommit,proto3" json:"inCommit,omitempty"` 1691 InRollback bool `protobuf:"varint,13,opt,name=inRollback,proto3" json:"inRollback,omitempty"` 1692 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1693 XXX_unrecognized []byte `json:"-"` 1694 XXX_sizecache int32 `json:"-"` 1695 } 1696 1697 func (m *TxnOptions) Reset() { *m = TxnOptions{} } 1698 func (m *TxnOptions) String() string { return proto.CompactTextString(m) } 1699 func (*TxnOptions) ProtoMessage() {} 1700 func (*TxnOptions) Descriptor() ([]byte, []int) { 1701 return fileDescriptor_4f782e76b37adb9a, []int{22} 1702 } 1703 func (m *TxnOptions) XXX_Unmarshal(b []byte) error { 1704 return m.Unmarshal(b) 1705 } 1706 func (m *TxnOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1707 if deterministic { 1708 return xxx_messageInfo_TxnOptions.Marshal(b, m, deterministic) 1709 } else { 1710 b = b[:cap(b)] 1711 n, err := m.MarshalToSizedBuffer(b) 1712 if err != nil { 1713 return nil, err 1714 } 1715 return b[:n], nil 1716 } 1717 } 1718 func (m *TxnOptions) XXX_Merge(src proto.Message) { 1719 xxx_messageInfo_TxnOptions.Merge(m, src) 1720 } 1721 func (m *TxnOptions) XXX_Size() int { 1722 return m.Size() 1723 } 1724 func (m *TxnOptions) XXX_DiscardUnknown() { 1725 xxx_messageInfo_TxnOptions.DiscardUnknown(m) 1726 } 1727 1728 var xxx_messageInfo_TxnOptions proto.InternalMessageInfo 1729 1730 func (m *TxnOptions) GetFeatures() uint32 { 1731 if m != nil { 1732 return m.Features 1733 } 1734 return 0 1735 } 1736 1737 func (m *TxnOptions) GetCN() string { 1738 if m != nil { 1739 return m.CN 1740 } 1741 return "" 1742 } 1743 1744 func (m *TxnOptions) GetSessionID() string { 1745 if m != nil { 1746 return m.SessionID 1747 } 1748 return "" 1749 } 1750 1751 func (m *TxnOptions) GetAccountID() uint32 { 1752 if m != nil { 1753 return m.AccountID 1754 } 1755 return 0 1756 } 1757 1758 func (m *TxnOptions) GetConnectionID() uint32 { 1759 if m != nil { 1760 return m.ConnectionID 1761 } 1762 return 0 1763 } 1764 1765 func (m *TxnOptions) GetUserName() string { 1766 if m != nil { 1767 return m.UserName 1768 } 1769 return "" 1770 } 1771 1772 func (m *TxnOptions) GetSkipLockTables() []uint64 { 1773 if m != nil { 1774 return m.SkipLockTables 1775 } 1776 return nil 1777 } 1778 1779 func (m *TxnOptions) GetSkipLockTableModes() []lock.LockMode { 1780 if m != nil { 1781 return m.SkipLockTableModes 1782 } 1783 return nil 1784 } 1785 1786 func (m *TxnOptions) GetCounter() string { 1787 if m != nil { 1788 return m.Counter 1789 } 1790 return "" 1791 } 1792 1793 func (m *TxnOptions) GetSessionInfo() string { 1794 if m != nil { 1795 return m.SessionInfo 1796 } 1797 return "" 1798 } 1799 1800 func (m *TxnOptions) GetInRunSql() bool { 1801 if m != nil { 1802 return m.InRunSql 1803 } 1804 return false 1805 } 1806 1807 func (m *TxnOptions) GetInCommit() bool { 1808 if m != nil { 1809 return m.InCommit 1810 } 1811 return false 1812 } 1813 1814 func (m *TxnOptions) GetInRollback() bool { 1815 if m != nil { 1816 return m.InRollback 1817 } 1818 return false 1819 } 1820 1821 func init() { 1822 proto.RegisterEnum("txn.TxnIsolation", TxnIsolation_name, TxnIsolation_value) 1823 proto.RegisterEnum("txn.TxnMode", TxnMode_name, TxnMode_value) 1824 proto.RegisterEnum("txn.TxnStatus", TxnStatus_name, TxnStatus_value) 1825 proto.RegisterEnum("txn.TxnMethod", TxnMethod_name, TxnMethod_value) 1826 proto.RegisterType((*TxnMeta)(nil), "txn.TxnMeta") 1827 proto.RegisterType((*CNTxnSnapshot)(nil), "txn.CNTxnSnapshot") 1828 proto.RegisterType((*CNOpRequest)(nil), "txn.CNOpRequest") 1829 proto.RegisterType((*CNOpResponse)(nil), "txn.CNOpResponse") 1830 proto.RegisterType((*TxnRequest)(nil), "txn.TxnRequest") 1831 proto.RegisterType((*TxnRequestOptions)(nil), "txn.TxnRequestOptions") 1832 proto.RegisterType((*TxnResponse)(nil), "txn.TxnResponse") 1833 proto.RegisterType((*TxnCommitRequest)(nil), "txn.TxnCommitRequest") 1834 proto.RegisterType((*TxnCommitResponse)(nil), "txn.TxnCommitResponse") 1835 proto.RegisterType((*TxnRollbackRequest)(nil), "txn.TxnRollbackRequest") 1836 proto.RegisterType((*TxnRollbackResponse)(nil), "txn.TxnRollbackResponse") 1837 proto.RegisterType((*TxnPrepareRequest)(nil), "txn.TxnPrepareRequest") 1838 proto.RegisterType((*TxnPrepareResponse)(nil), "txn.TxnPrepareResponse") 1839 proto.RegisterType((*TxnGetStatusRequest)(nil), "txn.TxnGetStatusRequest") 1840 proto.RegisterType((*TxnGetStatusResponse)(nil), "txn.TxnGetStatusResponse") 1841 proto.RegisterType((*TxnCommitTNShardRequest)(nil), "txn.TxnCommitTNShardRequest") 1842 proto.RegisterType((*TxnCommitTNShardResponse)(nil), "txn.TxnCommitTNShardResponse") 1843 proto.RegisterType((*TxnRollbackTNShardRequest)(nil), "txn.TxnRollbackTNShardRequest") 1844 proto.RegisterType((*TxnRollbackTNShardResponse)(nil), "txn.TxnRollbackTNShardResponse") 1845 proto.RegisterType((*TxnRemoveMetadataRequest)(nil), "txn.TxnRemoveMetadataRequest") 1846 proto.RegisterType((*TxnRemoveMetadataResponse)(nil), "txn.TxnRemoveMetadataResponse") 1847 proto.RegisterType((*TxnError)(nil), "txn.TxnError") 1848 proto.RegisterType((*TxnOptions)(nil), "txn.TxnOptions") 1849 } 1850 1851 func init() { proto.RegisterFile("txn.proto", fileDescriptor_4f782e76b37adb9a) } 1852 1853 var fileDescriptor_4f782e76b37adb9a = []byte{ 1854 // 1519 bytes of a gzipped FileDescriptorProto 1855 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xdd, 0x6e, 0xdb, 0x46, 1856 0x16, 0x36, 0xf5, 0x4b, 0x1e, 0xfd, 0x98, 0x9e, 0x38, 0x0e, 0xe3, 0xcd, 0x2a, 0x02, 0x11, 0x04, 1857 0x8a, 0x91, 0xb5, 0x36, 0x09, 0xb2, 0x17, 0xbb, 0x80, 0x01, 0x47, 0xb6, 0xb3, 0x06, 0x62, 0xd9, 1858 0x18, 0x29, 0x2d, 0xd2, 0x9b, 0x82, 0x96, 0x26, 0x32, 0x61, 0x89, 0x54, 0xc8, 0xb1, 0x21, 0x3f, 1859 0x44, 0x9f, 0xa0, 0x2f, 0xd1, 0xc7, 0xc8, 0x65, 0x9e, 0xa0, 0x68, 0x03, 0xf4, 0xa6, 0xb7, 0x7d, 1860 0x81, 0x62, 0x0e, 0x67, 0x28, 0x92, 0x92, 0x92, 0xc2, 0xbd, 0x12, 0xcf, 0xff, 0xcc, 0x99, 0xf3, 1861 0x9d, 0x33, 0x23, 0x30, 0xf8, 0xcc, 0xdb, 0x9d, 0x06, 0x3e, 0xf7, 0x49, 0x9e, 0xcf, 0xbc, 0xed, 1862 0x7f, 0x8d, 0x5c, 0x7e, 0x71, 0x75, 0xbe, 0x3b, 0xf0, 0x27, 0xed, 0x91, 0x3f, 0xf2, 0xdb, 0x28, 1863 0x3b, 0xbf, 0x7a, 0x8f, 0x14, 0x12, 0xf8, 0x15, 0xd9, 0x6c, 0xaf, 0x73, 0x77, 0xc2, 0x42, 0xee, 1864 0x4c, 0xa6, 0x92, 0x51, 0x9f, 0x30, 0xee, 0x0c, 0x1d, 0xee, 0x48, 0x1a, 0xc6, 0xfe, 0xe0, 0x32, 1865 0xfa, 0xb6, 0x7f, 0xcf, 0x43, 0xb9, 0x3f, 0xf3, 0x4e, 0x18, 0x77, 0x48, 0x1d, 0x72, 0xc7, 0x07, 1866 0x96, 0xd6, 0xd4, 0x5a, 0x55, 0x9a, 0x3b, 0x3e, 0x20, 0x8f, 0xa1, 0xd4, 0xe3, 0x0e, 0xbf, 0x0a, 1867 0xad, 0x5c, 0x53, 0x6b, 0xd5, 0x9f, 0xd7, 0x77, 0xc5, 0xc2, 0xfa, 0x33, 0x2f, 0xe2, 0x52, 0x29, 1868 0x25, 0xff, 0x05, 0xe8, 0x79, 0xce, 0x34, 0xbc, 0xf0, 0x79, 0xbf, 0x67, 0xe5, 0x9b, 0x5a, 0xab, 1869 0xf2, 0x7c, 0x73, 0x77, 0xbe, 0x8a, 0xbe, 0xfa, 0x7a, 0x55, 0xf8, 0xf8, 0xf3, 0xc3, 0x35, 0x9a, 1870 0xd0, 0x16, 0xb6, 0x67, 0x01, 0x9b, 0x3a, 0x01, 0x1b, 0xf6, 0x7b, 0x56, 0xe1, 0xeb, 0xb6, 0x73, 1871 0x6d, 0xf2, 0x1f, 0xd0, 0x3b, 0xfe, 0x64, 0xe2, 0x8a, 0xa8, 0xc5, 0xaf, 0x5a, 0xc6, 0xba, 0xe4, 1872 0x05, 0xe8, 0xfd, 0x6e, 0xef, 0xc2, 0x09, 0x86, 0xa1, 0x55, 0x6a, 0xe6, 0x5b, 0x95, 0xe7, 0x1b, 1873 0xbb, 0x71, 0x8a, 0xa4, 0x44, 0x19, 0x29, 0x45, 0xf2, 0x12, 0xe0, 0x8d, 0x3f, 0xb8, 0xec, 0x3b, 1874 0xe7, 0x63, 0x16, 0x5a, 0x65, 0x34, 0x5b, 0xdf, 0xc5, 0x4c, 0xc6, 0x7c, 0xb5, 0xc6, 0xb9, 0x22, 1875 0x69, 0x42, 0xe1, 0xc4, 0x1f, 0x32, 0x4b, 0xc7, 0x0c, 0x56, 0x55, 0x06, 0x05, 0x8f, 0xa2, 0x84, 1876 0xb4, 0xc1, 0x38, 0x0e, 0xfd, 0xb1, 0xc3, 0x5d, 0xdf, 0xb3, 0x0c, 0x54, 0xdb, 0x50, 0x6a, 0xb1, 1877 0x80, 0xce, 0x75, 0xc8, 0x16, 0x94, 0x4e, 0xdc, 0x20, 0xf0, 0x03, 0x0b, 0x9a, 0x5a, 0x4b, 0xa7, 1878 0x92, 0x22, 0x4d, 0xa8, 0x88, 0xc0, 0x3d, 0x16, 0x5c, 0xbb, 0x03, 0x66, 0x55, 0x9a, 0x5a, 0xcb, 1879 0xa0, 0x49, 0x96, 0xfd, 0x43, 0x0e, 0x6a, 0x9d, 0xae, 0x38, 0x40, 0x79, 0x00, 0xe4, 0x11, 0xe4, 1880 0xfb, 0x33, 0x0f, 0xcf, 0xbc, 0x92, 0x58, 0x1d, 0xe3, 0x8e, 0xdc, 0x8b, 0x10, 0x93, 0x07, 0x60, 1881 0x50, 0xe6, 0x0c, 0x6f, 0x4e, 0xbd, 0xf1, 0x0d, 0xd6, 0x82, 0x4e, 0xe7, 0x0c, 0xb2, 0x03, 0xe6, 1882 0xa1, 0x27, 0x76, 0xdb, 0x71, 0x06, 0x17, 0xec, 0xdb, 0xc0, 0xe5, 0x0c, 0x8b, 0x40, 0xa7, 0x0b, 1883 0x7c, 0xf2, 0x08, 0x6a, 0x07, 0x6e, 0x28, 0x98, 0xcf, 0xce, 0x3a, 0xa7, 0x53, 0x8e, 0x27, 0xae, 1884 0xd3, 0x34, 0x33, 0x93, 0xeb, 0xe2, 0x5f, 0xcd, 0x75, 0x1b, 0xca, 0xa7, 0x53, 0x91, 0x22, 0x71, 1885 0xac, 0x1a, 0xda, 0xc8, 0x0d, 0x49, 0xb6, 0xb4, 0x51, 0x5a, 0xf6, 0x14, 0x2a, 0x9d, 0xee, 0xe9, 1886 0x94, 0xb2, 0x0f, 0x57, 0x2c, 0xe4, 0x22, 0xb1, 0xa7, 0xd3, 0x8e, 0x38, 0x2d, 0x91, 0x8f, 0x1a, 1887 0x95, 0x14, 0xb1, 0xa0, 0x7c, 0xe6, 0xdc, 0x8c, 0x7d, 0x67, 0x88, 0x9b, 0xaf, 0x52, 0x45, 0x92, 1888 0x36, 0x94, 0xfa, 0x4e, 0x30, 0x62, 0x5c, 0x56, 0xfd, 0xca, 0x3a, 0x92, 0x6a, 0x76, 0x0b, 0xaa, 1889 0x51, 0xc4, 0x70, 0xea, 0x7b, 0x61, 0xca, 0xb5, 0x96, 0x72, 0x6d, 0xff, 0x56, 0x04, 0xe8, 0xcf, 1890 0x3c, 0xb5, 0x36, 0x3c, 0x02, 0xfc, 0x94, 0x10, 0x2d, 0xd0, 0x39, 0x43, 0x1d, 0x63, 0xee, 0xcb, 1891 0xc7, 0xf8, 0x18, 0x4a, 0x27, 0x8c, 0x5f, 0xf8, 0x43, 0x5c, 0x6d, 0x02, 0xcf, 0x11, 0x97, 0x4a, 1892 0x29, 0x21, 0x50, 0x38, 0x1a, 0x3b, 0x23, 0x3c, 0x9b, 0x1a, 0xc5, 0x6f, 0xb2, 0x0b, 0x46, 0xa7, 1893 0x2b, 0x03, 0x4a, 0xb0, 0x99, 0x68, 0x9e, 0x48, 0x20, 0x9d, 0xab, 0x90, 0xff, 0x41, 0x2d, 0xc2, 1894 0x9b, 0xb2, 0x89, 0x4e, 0xe4, 0xae, 0x0a, 0x99, 0x12, 0xd2, 0xb4, 0x2e, 0xd9, 0x87, 0x75, 0xea, 1895 0x8f, 0xc7, 0xe7, 0xce, 0xe0, 0x52, 0x99, 0x97, 0xd1, 0xfc, 0x9e, 0x32, 0xcf, 0x88, 0x69, 0x56, 1896 0x9f, 0xec, 0x41, 0x5d, 0x76, 0x0a, 0xe5, 0x41, 0x47, 0x0f, 0x5b, 0xca, 0x43, 0x5a, 0x4a, 0x33, 1897 0xda, 0xe4, 0x00, 0xcc, 0xd7, 0x8c, 0xcb, 0x46, 0x27, 0x3d, 0x18, 0xe8, 0xc1, 0x52, 0x1e, 0xb2, 1898 0x72, 0xba, 0x60, 0x41, 0xce, 0x60, 0x53, 0x76, 0x9d, 0xa8, 0x1a, 0x94, 0x27, 0x40, 0x4f, 0x0f, 1899 0xd2, 0xc9, 0x48, 0xeb, 0xd0, 0xa5, 0x96, 0xe4, 0x1b, 0xd8, 0x52, 0x5b, 0xcd, 0xf8, 0xac, 0xa0, 1900 0xcf, 0x46, 0x36, 0x43, 0x19, 0xaf, 0x2b, 0xac, 0xc9, 0x21, 0xd4, 0x29, 0x9b, 0xf8, 0xd7, 0xec, 1901 0x44, 0x16, 0xb0, 0x55, 0x45, 0x7f, 0xff, 0x8c, 0xfd, 0xa5, 0xa4, 0x71, 0xda, 0xd2, 0x6c, 0xf2, 1902 0xef, 0x39, 0x04, 0x6b, 0xe9, 0x7c, 0x4b, 0x0b, 0x29, 0x9d, 0x63, 0xf0, 0x1d, 0x6c, 0x2c, 0x48, 1903 0x49, 0x03, 0x80, 0x32, 0x1e, 0xdc, 0x08, 0xf8, 0x85, 0x96, 0xd6, 0xcc, 0xb7, 0x8a, 0x34, 0xc1, 1904 0x11, 0x6d, 0x04, 0xa9, 0x63, 0x8f, 0xb3, 0xe0, 0xda, 0x19, 0x63, 0xe5, 0xe7, 0x69, 0x9a, 0x69, 1905 0xff, 0x51, 0x84, 0x0a, 0xfa, 0x96, 0x60, 0xfb, 0x32, 0x86, 0x1a, 0x2b, 0x31, 0xf4, 0xf7, 0xd1, 1906 0xf3, 0x04, 0xf4, 0xfe, 0xcc, 0x3b, 0xc4, 0xa6, 0x1d, 0x81, 0xa7, 0xa6, 0xac, 0x91, 0x49, 0x63, 1907 0x31, 0x79, 0x99, 0xee, 0x10, 0x12, 0x37, 0x1b, 0x09, 0xac, 0x45, 0x02, 0x9a, 0x6e, 0x24, 0x7b, 1908 0x50, 0x57, 0x18, 0x92, 0x86, 0xe5, 0x74, 0xfe, 0xd3, 0x52, 0x9a, 0xd1, 0x16, 0xf5, 0x3e, 0x87, 1909 0x90, 0xf4, 0xa0, 0xa7, 0xeb, 0x3d, 0x2b, 0xa7, 0x0b, 0x16, 0x02, 0xb8, 0x31, 0x8e, 0xa4, 0x13, 1910 0x23, 0x0d, 0xdc, 0x8c, 0x98, 0x66, 0xf5, 0xc9, 0x6b, 0xd8, 0x48, 0xc0, 0x48, 0x3a, 0x89, 0xf0, 1911 0x72, 0x7f, 0x09, 0xf2, 0xa4, 0x9b, 0x45, 0x1b, 0xd2, 0x83, 0xbb, 0x19, 0x04, 0x49, 0x67, 0x95, 1912 0x74, 0x61, 0x2f, 0x55, 0xa2, 0xcb, 0x6d, 0xc9, 0x3b, 0xb8, 0xb7, 0x00, 0x20, 0xe9, 0x36, 0xc2, 1913 0xcb, 0xc3, 0x95, 0xf8, 0x93, 0x8e, 0x57, 0xd9, 0x93, 0xa3, 0x05, 0x04, 0xd6, 0x32, 0x88, 0xce, 1914 0x20, 0x50, 0x9d, 0x64, 0x9a, 0x6f, 0x0f, 0xc0, 0xcc, 0xf6, 0x57, 0xf2, 0x24, 0x39, 0x66, 0xf2, 1915 0xc9, 0xc9, 0xa8, 0x80, 0x1c, 0x8f, 0xb4, 0x85, 0x09, 0x9d, 0x5b, 0x32, 0xa1, 0xed, 0x7d, 0x44, 1916 0x6d, 0xa6, 0x86, 0x9e, 0xc2, 0xc6, 0xb1, 0x77, 0xed, 0x8c, 0xdd, 0x61, 0x62, 0x7a, 0x8b, 0x78, 1917 0x05, 0xba, 0x28, 0xb0, 0x37, 0x81, 0x2c, 0x36, 0x72, 0xfb, 0x2e, 0xdc, 0x59, 0x52, 0x6a, 0xf6, 1918 0x11, 0xc6, 0xcb, 0xf4, 0xe8, 0x67, 0x50, 0x96, 0x49, 0x94, 0x17, 0x98, 0x95, 0xe3, 0x57, 0xe9, 1919 0xc9, 0xa0, 0x99, 0x9a, 0xb3, 0xff, 0x8f, 0x41, 0x17, 0xba, 0xf7, 0x2d, 0xfc, 0x6f, 0xc1, 0xe6, 1920 0xb2, 0xfa, 0xb4, 0xdf, 0xc0, 0xbd, 0x15, 0x7d, 0xfe, 0x36, 0x51, 0xb6, 0xc1, 0x5a, 0x55, 0xb8, 1921 0x76, 0x17, 0xee, 0xaf, 0xec, 0xfe, 0xb7, 0x89, 0xf5, 0x00, 0xb6, 0x57, 0x57, 0xb3, 0x7d, 0x82, 1922 0x2b, 0x59, 0x3a, 0x1b, 0x6e, 0x13, 0xec, 0x1f, 0xd1, 0xe2, 0x97, 0x16, 0xba, 0xdd, 0x9f, 0x37, 1923 0x51, 0xd1, 0x64, 0x13, 0x17, 0x35, 0xfc, 0x26, 0x9b, 0x50, 0x8c, 0x3a, 0x6c, 0x74, 0x49, 0x8b, 1924 0x08, 0x31, 0x4a, 0x22, 0x2b, 0xd4, 0xcf, 0xa3, 0x7e, 0x82, 0x63, 0xff, 0x94, 0x47, 0x05, 0x35, 1925 0x79, 0xb6, 0x41, 0x3f, 0x62, 0x0e, 0xbf, 0x0a, 0xb0, 0x74, 0x85, 0x72, 0x4c, 0x8b, 0xf7, 0x51, 1926 0xa7, 0x8b, 0xde, 0x0d, 0x9a, 0xeb, 0x74, 0xc5, 0x3c, 0xe9, 0xb1, 0x30, 0x74, 0x7d, 0xef, 0xf8, 1927 0x00, 0x3d, 0x1b, 0x74, 0xce, 0x10, 0xd2, 0xfd, 0xc1, 0xc0, 0xbf, 0xf2, 0xc4, 0xb4, 0x89, 0x86, 1928 0xc1, 0x9c, 0x41, 0x6c, 0xa8, 0x76, 0x7c, 0xcf, 0x63, 0x03, 0x1e, 0x99, 0x17, 0x51, 0x21, 0xc5, 1929 0x13, 0x6b, 0x79, 0x1b, 0xb2, 0xa0, 0xeb, 0x4c, 0xa2, 0x31, 0x60, 0xd0, 0x98, 0x26, 0x8f, 0xa1, 1930 0xde, 0xbb, 0x74, 0xa7, 0x99, 0x27, 0x49, 0x81, 0x66, 0xb8, 0x64, 0x0f, 0x48, 0x8a, 0x73, 0x82, 1931 0x13, 0x55, 0x6f, 0xe6, 0x71, 0x82, 0xc5, 0x57, 0x6a, 0x7c, 0x8f, 0x2c, 0xd1, 0x14, 0x17, 0x54, 1932 0x5c, 0x32, 0x0b, 0xb0, 0x93, 0x1b, 0x54, 0x91, 0xe2, 0xb9, 0x11, 0xca, 0xcd, 0x7a, 0xef, 0x7d, 1933 0x6c, 0xd1, 0x06, 0x4d, 0xb2, 0xc4, 0xfa, 0x5d, 0x8f, 0x5e, 0x79, 0xbd, 0x0f, 0x63, 0x6c, 0xba, 1934 0x3a, 0x8d, 0xe9, 0x48, 0x16, 0x55, 0x30, 0x76, 0x4e, 0x94, 0x45, 0xb4, 0x38, 0x32, 0x37, 0xae, 1935 0x38, 0xec, 0x82, 0x3a, 0x4d, 0x70, 0x76, 0x1a, 0x50, 0x4d, 0xbe, 0x8d, 0x48, 0x09, 0x72, 0xbd, 1936 0x63, 0x73, 0x4d, 0xfc, 0xd2, 0x8e, 0xa9, 0xed, 0xec, 0x44, 0x4f, 0x5a, 0x51, 0x13, 0x75, 0x00, 1937 0x71, 0xb2, 0x13, 0x37, 0xe4, 0xee, 0xc0, 0x5c, 0x23, 0xeb, 0x50, 0x39, 0x13, 0x2b, 0x94, 0x0c, 1938 0x6d, 0xe7, 0x7b, 0x30, 0xe2, 0x07, 0x2d, 0x01, 0x28, 0xed, 0x0f, 0xb8, 0x7b, 0xcd, 0xcc, 0x35, 1939 0x52, 0x05, 0x5d, 0x3d, 0x35, 0x4d, 0x4d, 0xf8, 0x89, 0x16, 0xc7, 0x5d, 0x6f, 0x64, 0xe6, 0x48, 1940 0x0d, 0x0c, 0x49, 0xb3, 0xa1, 0x99, 0x17, 0xca, 0xfb, 0xe7, 0x7e, 0x80, 0xc2, 0x02, 0xa9, 0x40, 1941 0x19, 0x29, 0x36, 0x34, 0x8b, 0x3b, 0x3f, 0x6a, 0x18, 0x41, 0x5e, 0x0e, 0x74, 0x28, 0x88, 0x87, 1942 0x93, 0xb9, 0x46, 0x0c, 0x28, 0xe2, 0x93, 0xc8, 0xd4, 0x44, 0xd8, 0xc8, 0x99, 0x99, 0x13, 0x9e, 1943 0xd4, 0x3e, 0xcd, 0xbc, 0xf0, 0x24, 0x17, 0x61, 0x16, 0x44, 0xcc, 0xb8, 0xb1, 0x98, 0x45, 0xb2, 1944 0xa1, 0x6e, 0xd8, 0x12, 0x3c, 0x66, 0x89, 0xdc, 0x99, 0xdf, 0x9b, 0x15, 0xb3, 0x4c, 0x4c, 0xa8, 1945 0x2a, 0x40, 0x09, 0x38, 0x99, 0xba, 0x08, 0x7d, 0x70, 0xf8, 0xea, 0xed, 0x6b, 0xd3, 0x78, 0xb5, 1946 0xf7, 0xe9, 0xd7, 0x86, 0xf6, 0xf1, 0x73, 0x43, 0xfb, 0xf4, 0xb9, 0xa1, 0xfd, 0xf2, 0xb9, 0xa1, 1947 0x7d, 0xf7, 0x34, 0xf1, 0x67, 0xc3, 0xc4, 0xe1, 0x81, 0x3b, 0xf3, 0x03, 0x77, 0xe4, 0x7a, 0x8a, 1948 0xf0, 0x58, 0x7b, 0x7a, 0x39, 0x6a, 0x4f, 0xcf, 0xdb, 0x7c, 0xe6, 0x9d, 0x97, 0xf0, 0x5f, 0x84, 1949 0x17, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x74, 0x1a, 0x7a, 0xb3, 0x10, 0x00, 0x00, 1950 } 1951 1952 func (m *TxnMeta) Marshal() (dAtA []byte, err error) { 1953 size := m.Size() 1954 dAtA = make([]byte, size) 1955 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1956 if err != nil { 1957 return nil, err 1958 } 1959 return dAtA[:n], nil 1960 } 1961 1962 func (m *TxnMeta) MarshalTo(dAtA []byte) (int, error) { 1963 size := m.Size() 1964 return m.MarshalToSizedBuffer(dAtA[:size]) 1965 } 1966 1967 func (m *TxnMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1968 i := len(dAtA) 1969 _ = i 1970 var l int 1971 _ = l 1972 if m.XXX_unrecognized != nil { 1973 i -= len(m.XXX_unrecognized) 1974 copy(dAtA[i:], m.XXX_unrecognized) 1975 } 1976 if len(m.LockService) > 0 { 1977 i -= len(m.LockService) 1978 copy(dAtA[i:], m.LockService) 1979 i = encodeVarintTxn(dAtA, i, uint64(len(m.LockService))) 1980 i-- 1981 dAtA[i] = 0x5a 1982 } 1983 if m.Mirror { 1984 i-- 1985 if m.Mirror { 1986 dAtA[i] = 1 1987 } else { 1988 dAtA[i] = 0 1989 } 1990 i-- 1991 dAtA[i] = 0x50 1992 } 1993 if m.Isolation != 0 { 1994 i = encodeVarintTxn(dAtA, i, uint64(m.Isolation)) 1995 i-- 1996 dAtA[i] = 0x48 1997 } 1998 if m.Mode != 0 { 1999 i = encodeVarintTxn(dAtA, i, uint64(m.Mode)) 2000 i-- 2001 dAtA[i] = 0x40 2002 } 2003 if len(m.LockTables) > 0 { 2004 for iNdEx := len(m.LockTables) - 1; iNdEx >= 0; iNdEx-- { 2005 { 2006 size, err := m.LockTables[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2007 if err != nil { 2008 return 0, err 2009 } 2010 i -= size 2011 i = encodeVarintTxn(dAtA, i, uint64(size)) 2012 } 2013 i-- 2014 dAtA[i] = 0x3a 2015 } 2016 } 2017 if len(m.TNShards) > 0 { 2018 for iNdEx := len(m.TNShards) - 1; iNdEx >= 0; iNdEx-- { 2019 { 2020 size, err := m.TNShards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2021 if err != nil { 2022 return 0, err 2023 } 2024 i -= size 2025 i = encodeVarintTxn(dAtA, i, uint64(size)) 2026 } 2027 i-- 2028 dAtA[i] = 0x32 2029 } 2030 } 2031 { 2032 size, err := m.CommitTS.MarshalToSizedBuffer(dAtA[:i]) 2033 if err != nil { 2034 return 0, err 2035 } 2036 i -= size 2037 i = encodeVarintTxn(dAtA, i, uint64(size)) 2038 } 2039 i-- 2040 dAtA[i] = 0x2a 2041 { 2042 size, err := m.PreparedTS.MarshalToSizedBuffer(dAtA[:i]) 2043 if err != nil { 2044 return 0, err 2045 } 2046 i -= size 2047 i = encodeVarintTxn(dAtA, i, uint64(size)) 2048 } 2049 i-- 2050 dAtA[i] = 0x22 2051 { 2052 size, err := m.SnapshotTS.MarshalToSizedBuffer(dAtA[:i]) 2053 if err != nil { 2054 return 0, err 2055 } 2056 i -= size 2057 i = encodeVarintTxn(dAtA, i, uint64(size)) 2058 } 2059 i-- 2060 dAtA[i] = 0x1a 2061 if m.Status != 0 { 2062 i = encodeVarintTxn(dAtA, i, uint64(m.Status)) 2063 i-- 2064 dAtA[i] = 0x10 2065 } 2066 if len(m.ID) > 0 { 2067 i -= len(m.ID) 2068 copy(dAtA[i:], m.ID) 2069 i = encodeVarintTxn(dAtA, i, uint64(len(m.ID))) 2070 i-- 2071 dAtA[i] = 0xa 2072 } 2073 return len(dAtA) - i, nil 2074 } 2075 2076 func (m *CNTxnSnapshot) Marshal() (dAtA []byte, err error) { 2077 size := m.Size() 2078 dAtA = make([]byte, size) 2079 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2080 if err != nil { 2081 return nil, err 2082 } 2083 return dAtA[:n], nil 2084 } 2085 2086 func (m *CNTxnSnapshot) MarshalTo(dAtA []byte) (int, error) { 2087 size := m.Size() 2088 return m.MarshalToSizedBuffer(dAtA[:size]) 2089 } 2090 2091 func (m *CNTxnSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2092 i := len(dAtA) 2093 _ = i 2094 var l int 2095 _ = l 2096 if m.XXX_unrecognized != nil { 2097 i -= len(m.XXX_unrecognized) 2098 copy(dAtA[i:], m.XXX_unrecognized) 2099 } 2100 { 2101 size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) 2102 if err != nil { 2103 return 0, err 2104 } 2105 i -= size 2106 i = encodeVarintTxn(dAtA, i, uint64(size)) 2107 } 2108 i-- 2109 dAtA[i] = 0x32 2110 if len(m.LockTables) > 0 { 2111 for iNdEx := len(m.LockTables) - 1; iNdEx >= 0; iNdEx-- { 2112 { 2113 size, err := m.LockTables[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2114 if err != nil { 2115 return 0, err 2116 } 2117 i -= size 2118 i = encodeVarintTxn(dAtA, i, uint64(size)) 2119 } 2120 i-- 2121 dAtA[i] = 0x2a 2122 } 2123 } 2124 if m.Disable1PCOpt { 2125 i-- 2126 if m.Disable1PCOpt { 2127 dAtA[i] = 1 2128 } else { 2129 dAtA[i] = 0 2130 } 2131 i-- 2132 dAtA[i] = 0x20 2133 } 2134 if m.EnableCacheWrite { 2135 i-- 2136 if m.EnableCacheWrite { 2137 dAtA[i] = 1 2138 } else { 2139 dAtA[i] = 0 2140 } 2141 i-- 2142 dAtA[i] = 0x18 2143 } 2144 if m.ReadyOnly { 2145 i-- 2146 if m.ReadyOnly { 2147 dAtA[i] = 1 2148 } else { 2149 dAtA[i] = 0 2150 } 2151 i-- 2152 dAtA[i] = 0x10 2153 } 2154 { 2155 size, err := m.Txn.MarshalToSizedBuffer(dAtA[:i]) 2156 if err != nil { 2157 return 0, err 2158 } 2159 i -= size 2160 i = encodeVarintTxn(dAtA, i, uint64(size)) 2161 } 2162 i-- 2163 dAtA[i] = 0xa 2164 return len(dAtA) - i, nil 2165 } 2166 2167 func (m *CNOpRequest) Marshal() (dAtA []byte, err error) { 2168 size := m.Size() 2169 dAtA = make([]byte, size) 2170 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2171 if err != nil { 2172 return nil, err 2173 } 2174 return dAtA[:n], nil 2175 } 2176 2177 func (m *CNOpRequest) MarshalTo(dAtA []byte) (int, error) { 2178 size := m.Size() 2179 return m.MarshalToSizedBuffer(dAtA[:size]) 2180 } 2181 2182 func (m *CNOpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2183 i := len(dAtA) 2184 _ = i 2185 var l int 2186 _ = l 2187 if m.XXX_unrecognized != nil { 2188 i -= len(m.XXX_unrecognized) 2189 copy(dAtA[i:], m.XXX_unrecognized) 2190 } 2191 { 2192 size, err := m.Target.MarshalToSizedBuffer(dAtA[:i]) 2193 if err != nil { 2194 return 0, err 2195 } 2196 i -= size 2197 i = encodeVarintTxn(dAtA, i, uint64(size)) 2198 } 2199 i-- 2200 dAtA[i] = 0x1a 2201 if len(m.Payload) > 0 { 2202 i -= len(m.Payload) 2203 copy(dAtA[i:], m.Payload) 2204 i = encodeVarintTxn(dAtA, i, uint64(len(m.Payload))) 2205 i-- 2206 dAtA[i] = 0x12 2207 } 2208 if m.OpCode != 0 { 2209 i = encodeVarintTxn(dAtA, i, uint64(m.OpCode)) 2210 i-- 2211 dAtA[i] = 0x8 2212 } 2213 return len(dAtA) - i, nil 2214 } 2215 2216 func (m *CNOpResponse) Marshal() (dAtA []byte, err error) { 2217 size := m.Size() 2218 dAtA = make([]byte, size) 2219 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2220 if err != nil { 2221 return nil, err 2222 } 2223 return dAtA[:n], nil 2224 } 2225 2226 func (m *CNOpResponse) MarshalTo(dAtA []byte) (int, error) { 2227 size := m.Size() 2228 return m.MarshalToSizedBuffer(dAtA[:size]) 2229 } 2230 2231 func (m *CNOpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2232 i := len(dAtA) 2233 _ = i 2234 var l int 2235 _ = l 2236 if m.XXX_unrecognized != nil { 2237 i -= len(m.XXX_unrecognized) 2238 copy(dAtA[i:], m.XXX_unrecognized) 2239 } 2240 if len(m.Payload) > 0 { 2241 i -= len(m.Payload) 2242 copy(dAtA[i:], m.Payload) 2243 i = encodeVarintTxn(dAtA, i, uint64(len(m.Payload))) 2244 i-- 2245 dAtA[i] = 0xa 2246 } 2247 return len(dAtA) - i, nil 2248 } 2249 2250 func (m *TxnRequest) Marshal() (dAtA []byte, err error) { 2251 size := m.Size() 2252 dAtA = make([]byte, size) 2253 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2254 if err != nil { 2255 return nil, err 2256 } 2257 return dAtA[:n], nil 2258 } 2259 2260 func (m *TxnRequest) MarshalTo(dAtA []byte) (int, error) { 2261 size := m.Size() 2262 return m.MarshalToSizedBuffer(dAtA[:size]) 2263 } 2264 2265 func (m *TxnRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2266 i := len(dAtA) 2267 _ = i 2268 var l int 2269 _ = l 2270 if m.XXX_unrecognized != nil { 2271 i -= len(m.XXX_unrecognized) 2272 copy(dAtA[i:], m.XXX_unrecognized) 2273 } 2274 if m.Options != nil { 2275 { 2276 size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) 2277 if err != nil { 2278 return 0, err 2279 } 2280 i -= size 2281 i = encodeVarintTxn(dAtA, i, uint64(size)) 2282 } 2283 i-- 2284 dAtA[i] = 0x6a 2285 } 2286 if m.RemoveMetadata != nil { 2287 { 2288 size, err := m.RemoveMetadata.MarshalToSizedBuffer(dAtA[:i]) 2289 if err != nil { 2290 return 0, err 2291 } 2292 i -= size 2293 i = encodeVarintTxn(dAtA, i, uint64(size)) 2294 } 2295 i-- 2296 dAtA[i] = 0x62 2297 } 2298 if m.RollbackTNShardRequest != nil { 2299 { 2300 size, err := m.RollbackTNShardRequest.MarshalToSizedBuffer(dAtA[:i]) 2301 if err != nil { 2302 return 0, err 2303 } 2304 i -= size 2305 i = encodeVarintTxn(dAtA, i, uint64(size)) 2306 } 2307 i-- 2308 dAtA[i] = 0x5a 2309 } 2310 if m.CommitTNShardRequest != nil { 2311 { 2312 size, err := m.CommitTNShardRequest.MarshalToSizedBuffer(dAtA[:i]) 2313 if err != nil { 2314 return 0, err 2315 } 2316 i -= size 2317 i = encodeVarintTxn(dAtA, i, uint64(size)) 2318 } 2319 i-- 2320 dAtA[i] = 0x52 2321 } 2322 if m.GetStatusRequest != nil { 2323 { 2324 size, err := m.GetStatusRequest.MarshalToSizedBuffer(dAtA[:i]) 2325 if err != nil { 2326 return 0, err 2327 } 2328 i -= size 2329 i = encodeVarintTxn(dAtA, i, uint64(size)) 2330 } 2331 i-- 2332 dAtA[i] = 0x4a 2333 } 2334 if m.PrepareRequest != nil { 2335 { 2336 size, err := m.PrepareRequest.MarshalToSizedBuffer(dAtA[:i]) 2337 if err != nil { 2338 return 0, err 2339 } 2340 i -= size 2341 i = encodeVarintTxn(dAtA, i, uint64(size)) 2342 } 2343 i-- 2344 dAtA[i] = 0x42 2345 } 2346 if m.RollbackRequest != nil { 2347 { 2348 size, err := m.RollbackRequest.MarshalToSizedBuffer(dAtA[:i]) 2349 if err != nil { 2350 return 0, err 2351 } 2352 i -= size 2353 i = encodeVarintTxn(dAtA, i, uint64(size)) 2354 } 2355 i-- 2356 dAtA[i] = 0x3a 2357 } 2358 if m.CommitRequest != nil { 2359 { 2360 size, err := m.CommitRequest.MarshalToSizedBuffer(dAtA[:i]) 2361 if err != nil { 2362 return 0, err 2363 } 2364 i -= size 2365 i = encodeVarintTxn(dAtA, i, uint64(size)) 2366 } 2367 i-- 2368 dAtA[i] = 0x32 2369 } 2370 if m.CNRequest != nil { 2371 { 2372 size, err := m.CNRequest.MarshalToSizedBuffer(dAtA[:i]) 2373 if err != nil { 2374 return 0, err 2375 } 2376 i -= size 2377 i = encodeVarintTxn(dAtA, i, uint64(size)) 2378 } 2379 i-- 2380 dAtA[i] = 0x2a 2381 } 2382 if m.Flag != 0 { 2383 i = encodeVarintTxn(dAtA, i, uint64(m.Flag)) 2384 i-- 2385 dAtA[i] = 0x20 2386 } 2387 if m.Method != 0 { 2388 i = encodeVarintTxn(dAtA, i, uint64(m.Method)) 2389 i-- 2390 dAtA[i] = 0x18 2391 } 2392 { 2393 size, err := m.Txn.MarshalToSizedBuffer(dAtA[:i]) 2394 if err != nil { 2395 return 0, err 2396 } 2397 i -= size 2398 i = encodeVarintTxn(dAtA, i, uint64(size)) 2399 } 2400 i-- 2401 dAtA[i] = 0x12 2402 if m.RequestID != 0 { 2403 i = encodeVarintTxn(dAtA, i, uint64(m.RequestID)) 2404 i-- 2405 dAtA[i] = 0x8 2406 } 2407 return len(dAtA) - i, nil 2408 } 2409 2410 func (m *TxnRequestOptions) Marshal() (dAtA []byte, err error) { 2411 size := m.Size() 2412 dAtA = make([]byte, size) 2413 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2414 if err != nil { 2415 return nil, err 2416 } 2417 return dAtA[:n], nil 2418 } 2419 2420 func (m *TxnRequestOptions) MarshalTo(dAtA []byte) (int, error) { 2421 size := m.Size() 2422 return m.MarshalToSizedBuffer(dAtA[:size]) 2423 } 2424 2425 func (m *TxnRequestOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2426 i := len(dAtA) 2427 _ = i 2428 var l int 2429 _ = l 2430 if m.XXX_unrecognized != nil { 2431 i -= len(m.XXX_unrecognized) 2432 copy(dAtA[i:], m.XXX_unrecognized) 2433 } 2434 if m.RetryInterval != 0 { 2435 i = encodeVarintTxn(dAtA, i, uint64(m.RetryInterval)) 2436 i-- 2437 dAtA[i] = 0x10 2438 } 2439 if len(m.RetryCodes) > 0 { 2440 dAtA18 := make([]byte, len(m.RetryCodes)*10) 2441 var j17 int 2442 for _, num1 := range m.RetryCodes { 2443 num := uint64(num1) 2444 for num >= 1<<7 { 2445 dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) 2446 num >>= 7 2447 j17++ 2448 } 2449 dAtA18[j17] = uint8(num) 2450 j17++ 2451 } 2452 i -= j17 2453 copy(dAtA[i:], dAtA18[:j17]) 2454 i = encodeVarintTxn(dAtA, i, uint64(j17)) 2455 i-- 2456 dAtA[i] = 0xa 2457 } 2458 return len(dAtA) - i, nil 2459 } 2460 2461 func (m *TxnResponse) Marshal() (dAtA []byte, err error) { 2462 size := m.Size() 2463 dAtA = make([]byte, size) 2464 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2465 if err != nil { 2466 return nil, err 2467 } 2468 return dAtA[:n], nil 2469 } 2470 2471 func (m *TxnResponse) MarshalTo(dAtA []byte) (int, error) { 2472 size := m.Size() 2473 return m.MarshalToSizedBuffer(dAtA[:size]) 2474 } 2475 2476 func (m *TxnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2477 i := len(dAtA) 2478 _ = i 2479 var l int 2480 _ = l 2481 if m.XXX_unrecognized != nil { 2482 i -= len(m.XXX_unrecognized) 2483 copy(dAtA[i:], m.XXX_unrecognized) 2484 } 2485 if m.RemoveMetadata != nil { 2486 { 2487 size, err := m.RemoveMetadata.MarshalToSizedBuffer(dAtA[:i]) 2488 if err != nil { 2489 return 0, err 2490 } 2491 i -= size 2492 i = encodeVarintTxn(dAtA, i, uint64(size)) 2493 } 2494 i-- 2495 dAtA[i] = 0x6a 2496 } 2497 if m.RollbackTNShardResponse != nil { 2498 { 2499 size, err := m.RollbackTNShardResponse.MarshalToSizedBuffer(dAtA[:i]) 2500 if err != nil { 2501 return 0, err 2502 } 2503 i -= size 2504 i = encodeVarintTxn(dAtA, i, uint64(size)) 2505 } 2506 i-- 2507 dAtA[i] = 0x62 2508 } 2509 if m.CommitTNShardResponse != nil { 2510 { 2511 size, err := m.CommitTNShardResponse.MarshalToSizedBuffer(dAtA[:i]) 2512 if err != nil { 2513 return 0, err 2514 } 2515 i -= size 2516 i = encodeVarintTxn(dAtA, i, uint64(size)) 2517 } 2518 i-- 2519 dAtA[i] = 0x5a 2520 } 2521 if m.GetStatusResponse != nil { 2522 { 2523 size, err := m.GetStatusResponse.MarshalToSizedBuffer(dAtA[:i]) 2524 if err != nil { 2525 return 0, err 2526 } 2527 i -= size 2528 i = encodeVarintTxn(dAtA, i, uint64(size)) 2529 } 2530 i-- 2531 dAtA[i] = 0x52 2532 } 2533 if m.PrepareResponse != nil { 2534 { 2535 size, err := m.PrepareResponse.MarshalToSizedBuffer(dAtA[:i]) 2536 if err != nil { 2537 return 0, err 2538 } 2539 i -= size 2540 i = encodeVarintTxn(dAtA, i, uint64(size)) 2541 } 2542 i-- 2543 dAtA[i] = 0x4a 2544 } 2545 if m.RollbackResponse != nil { 2546 { 2547 size, err := m.RollbackResponse.MarshalToSizedBuffer(dAtA[:i]) 2548 if err != nil { 2549 return 0, err 2550 } 2551 i -= size 2552 i = encodeVarintTxn(dAtA, i, uint64(size)) 2553 } 2554 i-- 2555 dAtA[i] = 0x42 2556 } 2557 if m.CommitResponse != nil { 2558 { 2559 size, err := m.CommitResponse.MarshalToSizedBuffer(dAtA[:i]) 2560 if err != nil { 2561 return 0, err 2562 } 2563 i -= size 2564 i = encodeVarintTxn(dAtA, i, uint64(size)) 2565 } 2566 i-- 2567 dAtA[i] = 0x3a 2568 } 2569 if m.CNOpResponse != nil { 2570 { 2571 size, err := m.CNOpResponse.MarshalToSizedBuffer(dAtA[:i]) 2572 if err != nil { 2573 return 0, err 2574 } 2575 i -= size 2576 i = encodeVarintTxn(dAtA, i, uint64(size)) 2577 } 2578 i-- 2579 dAtA[i] = 0x32 2580 } 2581 if m.TxnError != nil { 2582 { 2583 size, err := m.TxnError.MarshalToSizedBuffer(dAtA[:i]) 2584 if err != nil { 2585 return 0, err 2586 } 2587 i -= size 2588 i = encodeVarintTxn(dAtA, i, uint64(size)) 2589 } 2590 i-- 2591 dAtA[i] = 0x2a 2592 } 2593 if m.Flag != 0 { 2594 i = encodeVarintTxn(dAtA, i, uint64(m.Flag)) 2595 i-- 2596 dAtA[i] = 0x20 2597 } 2598 if m.Method != 0 { 2599 i = encodeVarintTxn(dAtA, i, uint64(m.Method)) 2600 i-- 2601 dAtA[i] = 0x18 2602 } 2603 if m.Txn != nil { 2604 { 2605 size, err := m.Txn.MarshalToSizedBuffer(dAtA[:i]) 2606 if err != nil { 2607 return 0, err 2608 } 2609 i -= size 2610 i = encodeVarintTxn(dAtA, i, uint64(size)) 2611 } 2612 i-- 2613 dAtA[i] = 0x12 2614 } 2615 if m.RequestID != 0 { 2616 i = encodeVarintTxn(dAtA, i, uint64(m.RequestID)) 2617 i-- 2618 dAtA[i] = 0x8 2619 } 2620 return len(dAtA) - i, nil 2621 } 2622 2623 func (m *TxnCommitRequest) Marshal() (dAtA []byte, err error) { 2624 size := m.Size() 2625 dAtA = make([]byte, size) 2626 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2627 if err != nil { 2628 return nil, err 2629 } 2630 return dAtA[:n], nil 2631 } 2632 2633 func (m *TxnCommitRequest) MarshalTo(dAtA []byte) (int, error) { 2634 size := m.Size() 2635 return m.MarshalToSizedBuffer(dAtA[:size]) 2636 } 2637 2638 func (m *TxnCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2639 i := len(dAtA) 2640 _ = i 2641 var l int 2642 _ = l 2643 if m.XXX_unrecognized != nil { 2644 i -= len(m.XXX_unrecognized) 2645 copy(dAtA[i:], m.XXX_unrecognized) 2646 } 2647 if m.Disable1PCOpt { 2648 i-- 2649 if m.Disable1PCOpt { 2650 dAtA[i] = 1 2651 } else { 2652 dAtA[i] = 0 2653 } 2654 i-- 2655 dAtA[i] = 0x10 2656 } 2657 if len(m.Payload) > 0 { 2658 for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- { 2659 { 2660 size, err := m.Payload[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 2661 if err != nil { 2662 return 0, err 2663 } 2664 i -= size 2665 i = encodeVarintTxn(dAtA, i, uint64(size)) 2666 } 2667 i-- 2668 dAtA[i] = 0xa 2669 } 2670 } 2671 return len(dAtA) - i, nil 2672 } 2673 2674 func (m *TxnCommitResponse) Marshal() (dAtA []byte, err error) { 2675 size := m.Size() 2676 dAtA = make([]byte, size) 2677 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2678 if err != nil { 2679 return nil, err 2680 } 2681 return dAtA[:n], nil 2682 } 2683 2684 func (m *TxnCommitResponse) MarshalTo(dAtA []byte) (int, error) { 2685 size := m.Size() 2686 return m.MarshalToSizedBuffer(dAtA[:size]) 2687 } 2688 2689 func (m *TxnCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2690 i := len(dAtA) 2691 _ = i 2692 var l int 2693 _ = l 2694 if m.XXX_unrecognized != nil { 2695 i -= len(m.XXX_unrecognized) 2696 copy(dAtA[i:], m.XXX_unrecognized) 2697 } 2698 if len(m.InvalidLockTables) > 0 { 2699 dAtA30 := make([]byte, len(m.InvalidLockTables)*10) 2700 var j29 int 2701 for _, num := range m.InvalidLockTables { 2702 for num >= 1<<7 { 2703 dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) 2704 num >>= 7 2705 j29++ 2706 } 2707 dAtA30[j29] = uint8(num) 2708 j29++ 2709 } 2710 i -= j29 2711 copy(dAtA[i:], dAtA30[:j29]) 2712 i = encodeVarintTxn(dAtA, i, uint64(j29)) 2713 i-- 2714 dAtA[i] = 0xa 2715 } 2716 return len(dAtA) - i, nil 2717 } 2718 2719 func (m *TxnRollbackRequest) Marshal() (dAtA []byte, err error) { 2720 size := m.Size() 2721 dAtA = make([]byte, size) 2722 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2723 if err != nil { 2724 return nil, err 2725 } 2726 return dAtA[:n], nil 2727 } 2728 2729 func (m *TxnRollbackRequest) MarshalTo(dAtA []byte) (int, error) { 2730 size := m.Size() 2731 return m.MarshalToSizedBuffer(dAtA[:size]) 2732 } 2733 2734 func (m *TxnRollbackRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2735 i := len(dAtA) 2736 _ = i 2737 var l int 2738 _ = l 2739 if m.XXX_unrecognized != nil { 2740 i -= len(m.XXX_unrecognized) 2741 copy(dAtA[i:], m.XXX_unrecognized) 2742 } 2743 return len(dAtA) - i, nil 2744 } 2745 2746 func (m *TxnRollbackResponse) Marshal() (dAtA []byte, err error) { 2747 size := m.Size() 2748 dAtA = make([]byte, size) 2749 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2750 if err != nil { 2751 return nil, err 2752 } 2753 return dAtA[:n], nil 2754 } 2755 2756 func (m *TxnRollbackResponse) MarshalTo(dAtA []byte) (int, error) { 2757 size := m.Size() 2758 return m.MarshalToSizedBuffer(dAtA[:size]) 2759 } 2760 2761 func (m *TxnRollbackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2762 i := len(dAtA) 2763 _ = i 2764 var l int 2765 _ = l 2766 if m.XXX_unrecognized != nil { 2767 i -= len(m.XXX_unrecognized) 2768 copy(dAtA[i:], m.XXX_unrecognized) 2769 } 2770 return len(dAtA) - i, nil 2771 } 2772 2773 func (m *TxnPrepareRequest) Marshal() (dAtA []byte, err error) { 2774 size := m.Size() 2775 dAtA = make([]byte, size) 2776 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2777 if err != nil { 2778 return nil, err 2779 } 2780 return dAtA[:n], nil 2781 } 2782 2783 func (m *TxnPrepareRequest) MarshalTo(dAtA []byte) (int, error) { 2784 size := m.Size() 2785 return m.MarshalToSizedBuffer(dAtA[:size]) 2786 } 2787 2788 func (m *TxnPrepareRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2789 i := len(dAtA) 2790 _ = i 2791 var l int 2792 _ = l 2793 if m.XXX_unrecognized != nil { 2794 i -= len(m.XXX_unrecognized) 2795 copy(dAtA[i:], m.XXX_unrecognized) 2796 } 2797 { 2798 size, err := m.TNShard.MarshalToSizedBuffer(dAtA[:i]) 2799 if err != nil { 2800 return 0, err 2801 } 2802 i -= size 2803 i = encodeVarintTxn(dAtA, i, uint64(size)) 2804 } 2805 i-- 2806 dAtA[i] = 0xa 2807 return len(dAtA) - i, nil 2808 } 2809 2810 func (m *TxnPrepareResponse) Marshal() (dAtA []byte, err error) { 2811 size := m.Size() 2812 dAtA = make([]byte, size) 2813 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2814 if err != nil { 2815 return nil, err 2816 } 2817 return dAtA[:n], nil 2818 } 2819 2820 func (m *TxnPrepareResponse) MarshalTo(dAtA []byte) (int, error) { 2821 size := m.Size() 2822 return m.MarshalToSizedBuffer(dAtA[:size]) 2823 } 2824 2825 func (m *TxnPrepareResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2826 i := len(dAtA) 2827 _ = i 2828 var l int 2829 _ = l 2830 if m.XXX_unrecognized != nil { 2831 i -= len(m.XXX_unrecognized) 2832 copy(dAtA[i:], m.XXX_unrecognized) 2833 } 2834 return len(dAtA) - i, nil 2835 } 2836 2837 func (m *TxnGetStatusRequest) Marshal() (dAtA []byte, err error) { 2838 size := m.Size() 2839 dAtA = make([]byte, size) 2840 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2841 if err != nil { 2842 return nil, err 2843 } 2844 return dAtA[:n], nil 2845 } 2846 2847 func (m *TxnGetStatusRequest) MarshalTo(dAtA []byte) (int, error) { 2848 size := m.Size() 2849 return m.MarshalToSizedBuffer(dAtA[:size]) 2850 } 2851 2852 func (m *TxnGetStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2853 i := len(dAtA) 2854 _ = i 2855 var l int 2856 _ = l 2857 if m.XXX_unrecognized != nil { 2858 i -= len(m.XXX_unrecognized) 2859 copy(dAtA[i:], m.XXX_unrecognized) 2860 } 2861 { 2862 size, err := m.TNShard.MarshalToSizedBuffer(dAtA[:i]) 2863 if err != nil { 2864 return 0, err 2865 } 2866 i -= size 2867 i = encodeVarintTxn(dAtA, i, uint64(size)) 2868 } 2869 i-- 2870 dAtA[i] = 0xa 2871 return len(dAtA) - i, nil 2872 } 2873 2874 func (m *TxnGetStatusResponse) Marshal() (dAtA []byte, err error) { 2875 size := m.Size() 2876 dAtA = make([]byte, size) 2877 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2878 if err != nil { 2879 return nil, err 2880 } 2881 return dAtA[:n], nil 2882 } 2883 2884 func (m *TxnGetStatusResponse) MarshalTo(dAtA []byte) (int, error) { 2885 size := m.Size() 2886 return m.MarshalToSizedBuffer(dAtA[:size]) 2887 } 2888 2889 func (m *TxnGetStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2890 i := len(dAtA) 2891 _ = i 2892 var l int 2893 _ = l 2894 if m.XXX_unrecognized != nil { 2895 i -= len(m.XXX_unrecognized) 2896 copy(dAtA[i:], m.XXX_unrecognized) 2897 } 2898 return len(dAtA) - i, nil 2899 } 2900 2901 func (m *TxnCommitTNShardRequest) Marshal() (dAtA []byte, err error) { 2902 size := m.Size() 2903 dAtA = make([]byte, size) 2904 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2905 if err != nil { 2906 return nil, err 2907 } 2908 return dAtA[:n], nil 2909 } 2910 2911 func (m *TxnCommitTNShardRequest) MarshalTo(dAtA []byte) (int, error) { 2912 size := m.Size() 2913 return m.MarshalToSizedBuffer(dAtA[:size]) 2914 } 2915 2916 func (m *TxnCommitTNShardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2917 i := len(dAtA) 2918 _ = i 2919 var l int 2920 _ = l 2921 if m.XXX_unrecognized != nil { 2922 i -= len(m.XXX_unrecognized) 2923 copy(dAtA[i:], m.XXX_unrecognized) 2924 } 2925 { 2926 size, err := m.TNShard.MarshalToSizedBuffer(dAtA[:i]) 2927 if err != nil { 2928 return 0, err 2929 } 2930 i -= size 2931 i = encodeVarintTxn(dAtA, i, uint64(size)) 2932 } 2933 i-- 2934 dAtA[i] = 0xa 2935 return len(dAtA) - i, nil 2936 } 2937 2938 func (m *TxnCommitTNShardResponse) Marshal() (dAtA []byte, err error) { 2939 size := m.Size() 2940 dAtA = make([]byte, size) 2941 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2942 if err != nil { 2943 return nil, err 2944 } 2945 return dAtA[:n], nil 2946 } 2947 2948 func (m *TxnCommitTNShardResponse) MarshalTo(dAtA []byte) (int, error) { 2949 size := m.Size() 2950 return m.MarshalToSizedBuffer(dAtA[:size]) 2951 } 2952 2953 func (m *TxnCommitTNShardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2954 i := len(dAtA) 2955 _ = i 2956 var l int 2957 _ = l 2958 if m.XXX_unrecognized != nil { 2959 i -= len(m.XXX_unrecognized) 2960 copy(dAtA[i:], m.XXX_unrecognized) 2961 } 2962 return len(dAtA) - i, nil 2963 } 2964 2965 func (m *TxnRollbackTNShardRequest) Marshal() (dAtA []byte, err error) { 2966 size := m.Size() 2967 dAtA = make([]byte, size) 2968 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 2969 if err != nil { 2970 return nil, err 2971 } 2972 return dAtA[:n], nil 2973 } 2974 2975 func (m *TxnRollbackTNShardRequest) MarshalTo(dAtA []byte) (int, error) { 2976 size := m.Size() 2977 return m.MarshalToSizedBuffer(dAtA[:size]) 2978 } 2979 2980 func (m *TxnRollbackTNShardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 2981 i := len(dAtA) 2982 _ = i 2983 var l int 2984 _ = l 2985 if m.XXX_unrecognized != nil { 2986 i -= len(m.XXX_unrecognized) 2987 copy(dAtA[i:], m.XXX_unrecognized) 2988 } 2989 { 2990 size, err := m.TNShard.MarshalToSizedBuffer(dAtA[:i]) 2991 if err != nil { 2992 return 0, err 2993 } 2994 i -= size 2995 i = encodeVarintTxn(dAtA, i, uint64(size)) 2996 } 2997 i-- 2998 dAtA[i] = 0xa 2999 return len(dAtA) - i, nil 3000 } 3001 3002 func (m *TxnRollbackTNShardResponse) Marshal() (dAtA []byte, err error) { 3003 size := m.Size() 3004 dAtA = make([]byte, size) 3005 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 3006 if err != nil { 3007 return nil, err 3008 } 3009 return dAtA[:n], nil 3010 } 3011 3012 func (m *TxnRollbackTNShardResponse) MarshalTo(dAtA []byte) (int, error) { 3013 size := m.Size() 3014 return m.MarshalToSizedBuffer(dAtA[:size]) 3015 } 3016 3017 func (m *TxnRollbackTNShardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 3018 i := len(dAtA) 3019 _ = i 3020 var l int 3021 _ = l 3022 if m.XXX_unrecognized != nil { 3023 i -= len(m.XXX_unrecognized) 3024 copy(dAtA[i:], m.XXX_unrecognized) 3025 } 3026 return len(dAtA) - i, nil 3027 } 3028 3029 func (m *TxnRemoveMetadataRequest) Marshal() (dAtA []byte, err error) { 3030 size := m.Size() 3031 dAtA = make([]byte, size) 3032 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 3033 if err != nil { 3034 return nil, err 3035 } 3036 return dAtA[:n], nil 3037 } 3038 3039 func (m *TxnRemoveMetadataRequest) MarshalTo(dAtA []byte) (int, error) { 3040 size := m.Size() 3041 return m.MarshalToSizedBuffer(dAtA[:size]) 3042 } 3043 3044 func (m *TxnRemoveMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 3045 i := len(dAtA) 3046 _ = i 3047 var l int 3048 _ = l 3049 if m.XXX_unrecognized != nil { 3050 i -= len(m.XXX_unrecognized) 3051 copy(dAtA[i:], m.XXX_unrecognized) 3052 } 3053 { 3054 size, err := m.TNShard.MarshalToSizedBuffer(dAtA[:i]) 3055 if err != nil { 3056 return 0, err 3057 } 3058 i -= size 3059 i = encodeVarintTxn(dAtA, i, uint64(size)) 3060 } 3061 i-- 3062 dAtA[i] = 0xa 3063 return len(dAtA) - i, nil 3064 } 3065 3066 func (m *TxnRemoveMetadataResponse) Marshal() (dAtA []byte, err error) { 3067 size := m.Size() 3068 dAtA = make([]byte, size) 3069 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 3070 if err != nil { 3071 return nil, err 3072 } 3073 return dAtA[:n], nil 3074 } 3075 3076 func (m *TxnRemoveMetadataResponse) MarshalTo(dAtA []byte) (int, error) { 3077 size := m.Size() 3078 return m.MarshalToSizedBuffer(dAtA[:size]) 3079 } 3080 3081 func (m *TxnRemoveMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 3082 i := len(dAtA) 3083 _ = i 3084 var l int 3085 _ = l 3086 if m.XXX_unrecognized != nil { 3087 i -= len(m.XXX_unrecognized) 3088 copy(dAtA[i:], m.XXX_unrecognized) 3089 } 3090 return len(dAtA) - i, nil 3091 } 3092 3093 func (m *TxnError) Marshal() (dAtA []byte, err error) { 3094 size := m.Size() 3095 dAtA = make([]byte, size) 3096 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 3097 if err != nil { 3098 return nil, err 3099 } 3100 return dAtA[:n], nil 3101 } 3102 3103 func (m *TxnError) MarshalTo(dAtA []byte) (int, error) { 3104 size := m.Size() 3105 return m.MarshalToSizedBuffer(dAtA[:size]) 3106 } 3107 3108 func (m *TxnError) MarshalToSizedBuffer(dAtA []byte) (int, error) { 3109 i := len(dAtA) 3110 _ = i 3111 var l int 3112 _ = l 3113 if m.XXX_unrecognized != nil { 3114 i -= len(m.XXX_unrecognized) 3115 copy(dAtA[i:], m.XXX_unrecognized) 3116 } 3117 if m.TxnErrCode != 0 { 3118 i = encodeVarintTxn(dAtA, i, uint64(m.TxnErrCode)) 3119 i-- 3120 dAtA[i] = 0x18 3121 } 3122 if len(m.Error) > 0 { 3123 i -= len(m.Error) 3124 copy(dAtA[i:], m.Error) 3125 i = encodeVarintTxn(dAtA, i, uint64(len(m.Error))) 3126 i-- 3127 dAtA[i] = 0x12 3128 } 3129 if m.Code != 0 { 3130 i = encodeVarintTxn(dAtA, i, uint64(m.Code)) 3131 i-- 3132 dAtA[i] = 0x8 3133 } 3134 return len(dAtA) - i, nil 3135 } 3136 3137 func (m *TxnOptions) Marshal() (dAtA []byte, err error) { 3138 size := m.Size() 3139 dAtA = make([]byte, size) 3140 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 3141 if err != nil { 3142 return nil, err 3143 } 3144 return dAtA[:n], nil 3145 } 3146 3147 func (m *TxnOptions) MarshalTo(dAtA []byte) (int, error) { 3148 size := m.Size() 3149 return m.MarshalToSizedBuffer(dAtA[:size]) 3150 } 3151 3152 func (m *TxnOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { 3153 i := len(dAtA) 3154 _ = i 3155 var l int 3156 _ = l 3157 if m.XXX_unrecognized != nil { 3158 i -= len(m.XXX_unrecognized) 3159 copy(dAtA[i:], m.XXX_unrecognized) 3160 } 3161 if m.InRollback { 3162 i-- 3163 if m.InRollback { 3164 dAtA[i] = 1 3165 } else { 3166 dAtA[i] = 0 3167 } 3168 i-- 3169 dAtA[i] = 0x68 3170 } 3171 if m.InCommit { 3172 i-- 3173 if m.InCommit { 3174 dAtA[i] = 1 3175 } else { 3176 dAtA[i] = 0 3177 } 3178 i-- 3179 dAtA[i] = 0x60 3180 } 3181 if m.InRunSql { 3182 i-- 3183 if m.InRunSql { 3184 dAtA[i] = 1 3185 } else { 3186 dAtA[i] = 0 3187 } 3188 i-- 3189 dAtA[i] = 0x58 3190 } 3191 if len(m.SessionInfo) > 0 { 3192 i -= len(m.SessionInfo) 3193 copy(dAtA[i:], m.SessionInfo) 3194 i = encodeVarintTxn(dAtA, i, uint64(len(m.SessionInfo))) 3195 i-- 3196 dAtA[i] = 0x52 3197 } 3198 if len(m.Counter) > 0 { 3199 i -= len(m.Counter) 3200 copy(dAtA[i:], m.Counter) 3201 i = encodeVarintTxn(dAtA, i, uint64(len(m.Counter))) 3202 i-- 3203 dAtA[i] = 0x4a 3204 } 3205 if len(m.SkipLockTableModes) > 0 { 3206 dAtA37 := make([]byte, len(m.SkipLockTableModes)*10) 3207 var j36 int 3208 for _, num := range m.SkipLockTableModes { 3209 for num >= 1<<7 { 3210 dAtA37[j36] = uint8(uint64(num)&0x7f | 0x80) 3211 num >>= 7 3212 j36++ 3213 } 3214 dAtA37[j36] = uint8(num) 3215 j36++ 3216 } 3217 i -= j36 3218 copy(dAtA[i:], dAtA37[:j36]) 3219 i = encodeVarintTxn(dAtA, i, uint64(j36)) 3220 i-- 3221 dAtA[i] = 0x42 3222 } 3223 if len(m.SkipLockTables) > 0 { 3224 dAtA39 := make([]byte, len(m.SkipLockTables)*10) 3225 var j38 int 3226 for _, num := range m.SkipLockTables { 3227 for num >= 1<<7 { 3228 dAtA39[j38] = uint8(uint64(num)&0x7f | 0x80) 3229 num >>= 7 3230 j38++ 3231 } 3232 dAtA39[j38] = uint8(num) 3233 j38++ 3234 } 3235 i -= j38 3236 copy(dAtA[i:], dAtA39[:j38]) 3237 i = encodeVarintTxn(dAtA, i, uint64(j38)) 3238 i-- 3239 dAtA[i] = 0x3a 3240 } 3241 if len(m.UserName) > 0 { 3242 i -= len(m.UserName) 3243 copy(dAtA[i:], m.UserName) 3244 i = encodeVarintTxn(dAtA, i, uint64(len(m.UserName))) 3245 i-- 3246 dAtA[i] = 0x32 3247 } 3248 if m.ConnectionID != 0 { 3249 i = encodeVarintTxn(dAtA, i, uint64(m.ConnectionID)) 3250 i-- 3251 dAtA[i] = 0x28 3252 } 3253 if m.AccountID != 0 { 3254 i = encodeVarintTxn(dAtA, i, uint64(m.AccountID)) 3255 i-- 3256 dAtA[i] = 0x20 3257 } 3258 if len(m.SessionID) > 0 { 3259 i -= len(m.SessionID) 3260 copy(dAtA[i:], m.SessionID) 3261 i = encodeVarintTxn(dAtA, i, uint64(len(m.SessionID))) 3262 i-- 3263 dAtA[i] = 0x1a 3264 } 3265 if len(m.CN) > 0 { 3266 i -= len(m.CN) 3267 copy(dAtA[i:], m.CN) 3268 i = encodeVarintTxn(dAtA, i, uint64(len(m.CN))) 3269 i-- 3270 dAtA[i] = 0x12 3271 } 3272 if m.Features != 0 { 3273 i = encodeVarintTxn(dAtA, i, uint64(m.Features)) 3274 i-- 3275 dAtA[i] = 0x8 3276 } 3277 return len(dAtA) - i, nil 3278 } 3279 3280 func encodeVarintTxn(dAtA []byte, offset int, v uint64) int { 3281 offset -= sovTxn(v) 3282 base := offset 3283 for v >= 1<<7 { 3284 dAtA[offset] = uint8(v&0x7f | 0x80) 3285 v >>= 7 3286 offset++ 3287 } 3288 dAtA[offset] = uint8(v) 3289 return base 3290 } 3291 func (m *TxnMeta) Size() (n int) { 3292 if m == nil { 3293 return 0 3294 } 3295 var l int 3296 _ = l 3297 l = len(m.ID) 3298 if l > 0 { 3299 n += 1 + l + sovTxn(uint64(l)) 3300 } 3301 if m.Status != 0 { 3302 n += 1 + sovTxn(uint64(m.Status)) 3303 } 3304 l = m.SnapshotTS.Size() 3305 n += 1 + l + sovTxn(uint64(l)) 3306 l = m.PreparedTS.Size() 3307 n += 1 + l + sovTxn(uint64(l)) 3308 l = m.CommitTS.Size() 3309 n += 1 + l + sovTxn(uint64(l)) 3310 if len(m.TNShards) > 0 { 3311 for _, e := range m.TNShards { 3312 l = e.Size() 3313 n += 1 + l + sovTxn(uint64(l)) 3314 } 3315 } 3316 if len(m.LockTables) > 0 { 3317 for _, e := range m.LockTables { 3318 l = e.Size() 3319 n += 1 + l + sovTxn(uint64(l)) 3320 } 3321 } 3322 if m.Mode != 0 { 3323 n += 1 + sovTxn(uint64(m.Mode)) 3324 } 3325 if m.Isolation != 0 { 3326 n += 1 + sovTxn(uint64(m.Isolation)) 3327 } 3328 if m.Mirror { 3329 n += 2 3330 } 3331 l = len(m.LockService) 3332 if l > 0 { 3333 n += 1 + l + sovTxn(uint64(l)) 3334 } 3335 if m.XXX_unrecognized != nil { 3336 n += len(m.XXX_unrecognized) 3337 } 3338 return n 3339 } 3340 3341 func (m *CNTxnSnapshot) Size() (n int) { 3342 if m == nil { 3343 return 0 3344 } 3345 var l int 3346 _ = l 3347 l = m.Txn.Size() 3348 n += 1 + l + sovTxn(uint64(l)) 3349 if m.ReadyOnly { 3350 n += 2 3351 } 3352 if m.EnableCacheWrite { 3353 n += 2 3354 } 3355 if m.Disable1PCOpt { 3356 n += 2 3357 } 3358 if len(m.LockTables) > 0 { 3359 for _, e := range m.LockTables { 3360 l = e.Size() 3361 n += 1 + l + sovTxn(uint64(l)) 3362 } 3363 } 3364 l = m.Options.Size() 3365 n += 1 + l + sovTxn(uint64(l)) 3366 if m.XXX_unrecognized != nil { 3367 n += len(m.XXX_unrecognized) 3368 } 3369 return n 3370 } 3371 3372 func (m *CNOpRequest) Size() (n int) { 3373 if m == nil { 3374 return 0 3375 } 3376 var l int 3377 _ = l 3378 if m.OpCode != 0 { 3379 n += 1 + sovTxn(uint64(m.OpCode)) 3380 } 3381 l = len(m.Payload) 3382 if l > 0 { 3383 n += 1 + l + sovTxn(uint64(l)) 3384 } 3385 l = m.Target.Size() 3386 n += 1 + l + sovTxn(uint64(l)) 3387 if m.XXX_unrecognized != nil { 3388 n += len(m.XXX_unrecognized) 3389 } 3390 return n 3391 } 3392 3393 func (m *CNOpResponse) Size() (n int) { 3394 if m == nil { 3395 return 0 3396 } 3397 var l int 3398 _ = l 3399 l = len(m.Payload) 3400 if l > 0 { 3401 n += 1 + l + sovTxn(uint64(l)) 3402 } 3403 if m.XXX_unrecognized != nil { 3404 n += len(m.XXX_unrecognized) 3405 } 3406 return n 3407 } 3408 3409 func (m *TxnRequest) Size() (n int) { 3410 if m == nil { 3411 return 0 3412 } 3413 var l int 3414 _ = l 3415 if m.RequestID != 0 { 3416 n += 1 + sovTxn(uint64(m.RequestID)) 3417 } 3418 l = m.Txn.Size() 3419 n += 1 + l + sovTxn(uint64(l)) 3420 if m.Method != 0 { 3421 n += 1 + sovTxn(uint64(m.Method)) 3422 } 3423 if m.Flag != 0 { 3424 n += 1 + sovTxn(uint64(m.Flag)) 3425 } 3426 if m.CNRequest != nil { 3427 l = m.CNRequest.Size() 3428 n += 1 + l + sovTxn(uint64(l)) 3429 } 3430 if m.CommitRequest != nil { 3431 l = m.CommitRequest.Size() 3432 n += 1 + l + sovTxn(uint64(l)) 3433 } 3434 if m.RollbackRequest != nil { 3435 l = m.RollbackRequest.Size() 3436 n += 1 + l + sovTxn(uint64(l)) 3437 } 3438 if m.PrepareRequest != nil { 3439 l = m.PrepareRequest.Size() 3440 n += 1 + l + sovTxn(uint64(l)) 3441 } 3442 if m.GetStatusRequest != nil { 3443 l = m.GetStatusRequest.Size() 3444 n += 1 + l + sovTxn(uint64(l)) 3445 } 3446 if m.CommitTNShardRequest != nil { 3447 l = m.CommitTNShardRequest.Size() 3448 n += 1 + l + sovTxn(uint64(l)) 3449 } 3450 if m.RollbackTNShardRequest != nil { 3451 l = m.RollbackTNShardRequest.Size() 3452 n += 1 + l + sovTxn(uint64(l)) 3453 } 3454 if m.RemoveMetadata != nil { 3455 l = m.RemoveMetadata.Size() 3456 n += 1 + l + sovTxn(uint64(l)) 3457 } 3458 if m.Options != nil { 3459 l = m.Options.Size() 3460 n += 1 + l + sovTxn(uint64(l)) 3461 } 3462 if m.XXX_unrecognized != nil { 3463 n += len(m.XXX_unrecognized) 3464 } 3465 return n 3466 } 3467 3468 func (m *TxnRequestOptions) Size() (n int) { 3469 if m == nil { 3470 return 0 3471 } 3472 var l int 3473 _ = l 3474 if len(m.RetryCodes) > 0 { 3475 l = 0 3476 for _, e := range m.RetryCodes { 3477 l += sovTxn(uint64(e)) 3478 } 3479 n += 1 + sovTxn(uint64(l)) + l 3480 } 3481 if m.RetryInterval != 0 { 3482 n += 1 + sovTxn(uint64(m.RetryInterval)) 3483 } 3484 if m.XXX_unrecognized != nil { 3485 n += len(m.XXX_unrecognized) 3486 } 3487 return n 3488 } 3489 3490 func (m *TxnResponse) Size() (n int) { 3491 if m == nil { 3492 return 0 3493 } 3494 var l int 3495 _ = l 3496 if m.RequestID != 0 { 3497 n += 1 + sovTxn(uint64(m.RequestID)) 3498 } 3499 if m.Txn != nil { 3500 l = m.Txn.Size() 3501 n += 1 + l + sovTxn(uint64(l)) 3502 } 3503 if m.Method != 0 { 3504 n += 1 + sovTxn(uint64(m.Method)) 3505 } 3506 if m.Flag != 0 { 3507 n += 1 + sovTxn(uint64(m.Flag)) 3508 } 3509 if m.TxnError != nil { 3510 l = m.TxnError.Size() 3511 n += 1 + l + sovTxn(uint64(l)) 3512 } 3513 if m.CNOpResponse != nil { 3514 l = m.CNOpResponse.Size() 3515 n += 1 + l + sovTxn(uint64(l)) 3516 } 3517 if m.CommitResponse != nil { 3518 l = m.CommitResponse.Size() 3519 n += 1 + l + sovTxn(uint64(l)) 3520 } 3521 if m.RollbackResponse != nil { 3522 l = m.RollbackResponse.Size() 3523 n += 1 + l + sovTxn(uint64(l)) 3524 } 3525 if m.PrepareResponse != nil { 3526 l = m.PrepareResponse.Size() 3527 n += 1 + l + sovTxn(uint64(l)) 3528 } 3529 if m.GetStatusResponse != nil { 3530 l = m.GetStatusResponse.Size() 3531 n += 1 + l + sovTxn(uint64(l)) 3532 } 3533 if m.CommitTNShardResponse != nil { 3534 l = m.CommitTNShardResponse.Size() 3535 n += 1 + l + sovTxn(uint64(l)) 3536 } 3537 if m.RollbackTNShardResponse != nil { 3538 l = m.RollbackTNShardResponse.Size() 3539 n += 1 + l + sovTxn(uint64(l)) 3540 } 3541 if m.RemoveMetadata != nil { 3542 l = m.RemoveMetadata.Size() 3543 n += 1 + l + sovTxn(uint64(l)) 3544 } 3545 if m.XXX_unrecognized != nil { 3546 n += len(m.XXX_unrecognized) 3547 } 3548 return n 3549 } 3550 3551 func (m *TxnCommitRequest) Size() (n int) { 3552 if m == nil { 3553 return 0 3554 } 3555 var l int 3556 _ = l 3557 if len(m.Payload) > 0 { 3558 for _, e := range m.Payload { 3559 l = e.Size() 3560 n += 1 + l + sovTxn(uint64(l)) 3561 } 3562 } 3563 if m.Disable1PCOpt { 3564 n += 2 3565 } 3566 if m.XXX_unrecognized != nil { 3567 n += len(m.XXX_unrecognized) 3568 } 3569 return n 3570 } 3571 3572 func (m *TxnCommitResponse) Size() (n int) { 3573 if m == nil { 3574 return 0 3575 } 3576 var l int 3577 _ = l 3578 if len(m.InvalidLockTables) > 0 { 3579 l = 0 3580 for _, e := range m.InvalidLockTables { 3581 l += sovTxn(uint64(e)) 3582 } 3583 n += 1 + sovTxn(uint64(l)) + l 3584 } 3585 if m.XXX_unrecognized != nil { 3586 n += len(m.XXX_unrecognized) 3587 } 3588 return n 3589 } 3590 3591 func (m *TxnRollbackRequest) Size() (n int) { 3592 if m == nil { 3593 return 0 3594 } 3595 var l int 3596 _ = l 3597 if m.XXX_unrecognized != nil { 3598 n += len(m.XXX_unrecognized) 3599 } 3600 return n 3601 } 3602 3603 func (m *TxnRollbackResponse) Size() (n int) { 3604 if m == nil { 3605 return 0 3606 } 3607 var l int 3608 _ = l 3609 if m.XXX_unrecognized != nil { 3610 n += len(m.XXX_unrecognized) 3611 } 3612 return n 3613 } 3614 3615 func (m *TxnPrepareRequest) Size() (n int) { 3616 if m == nil { 3617 return 0 3618 } 3619 var l int 3620 _ = l 3621 l = m.TNShard.Size() 3622 n += 1 + l + sovTxn(uint64(l)) 3623 if m.XXX_unrecognized != nil { 3624 n += len(m.XXX_unrecognized) 3625 } 3626 return n 3627 } 3628 3629 func (m *TxnPrepareResponse) Size() (n int) { 3630 if m == nil { 3631 return 0 3632 } 3633 var l int 3634 _ = l 3635 if m.XXX_unrecognized != nil { 3636 n += len(m.XXX_unrecognized) 3637 } 3638 return n 3639 } 3640 3641 func (m *TxnGetStatusRequest) Size() (n int) { 3642 if m == nil { 3643 return 0 3644 } 3645 var l int 3646 _ = l 3647 l = m.TNShard.Size() 3648 n += 1 + l + sovTxn(uint64(l)) 3649 if m.XXX_unrecognized != nil { 3650 n += len(m.XXX_unrecognized) 3651 } 3652 return n 3653 } 3654 3655 func (m *TxnGetStatusResponse) Size() (n int) { 3656 if m == nil { 3657 return 0 3658 } 3659 var l int 3660 _ = l 3661 if m.XXX_unrecognized != nil { 3662 n += len(m.XXX_unrecognized) 3663 } 3664 return n 3665 } 3666 3667 func (m *TxnCommitTNShardRequest) Size() (n int) { 3668 if m == nil { 3669 return 0 3670 } 3671 var l int 3672 _ = l 3673 l = m.TNShard.Size() 3674 n += 1 + l + sovTxn(uint64(l)) 3675 if m.XXX_unrecognized != nil { 3676 n += len(m.XXX_unrecognized) 3677 } 3678 return n 3679 } 3680 3681 func (m *TxnCommitTNShardResponse) Size() (n int) { 3682 if m == nil { 3683 return 0 3684 } 3685 var l int 3686 _ = l 3687 if m.XXX_unrecognized != nil { 3688 n += len(m.XXX_unrecognized) 3689 } 3690 return n 3691 } 3692 3693 func (m *TxnRollbackTNShardRequest) Size() (n int) { 3694 if m == nil { 3695 return 0 3696 } 3697 var l int 3698 _ = l 3699 l = m.TNShard.Size() 3700 n += 1 + l + sovTxn(uint64(l)) 3701 if m.XXX_unrecognized != nil { 3702 n += len(m.XXX_unrecognized) 3703 } 3704 return n 3705 } 3706 3707 func (m *TxnRollbackTNShardResponse) Size() (n int) { 3708 if m == nil { 3709 return 0 3710 } 3711 var l int 3712 _ = l 3713 if m.XXX_unrecognized != nil { 3714 n += len(m.XXX_unrecognized) 3715 } 3716 return n 3717 } 3718 3719 func (m *TxnRemoveMetadataRequest) Size() (n int) { 3720 if m == nil { 3721 return 0 3722 } 3723 var l int 3724 _ = l 3725 l = m.TNShard.Size() 3726 n += 1 + l + sovTxn(uint64(l)) 3727 if m.XXX_unrecognized != nil { 3728 n += len(m.XXX_unrecognized) 3729 } 3730 return n 3731 } 3732 3733 func (m *TxnRemoveMetadataResponse) Size() (n int) { 3734 if m == nil { 3735 return 0 3736 } 3737 var l int 3738 _ = l 3739 if m.XXX_unrecognized != nil { 3740 n += len(m.XXX_unrecognized) 3741 } 3742 return n 3743 } 3744 3745 func (m *TxnError) Size() (n int) { 3746 if m == nil { 3747 return 0 3748 } 3749 var l int 3750 _ = l 3751 if m.Code != 0 { 3752 n += 1 + sovTxn(uint64(m.Code)) 3753 } 3754 l = len(m.Error) 3755 if l > 0 { 3756 n += 1 + l + sovTxn(uint64(l)) 3757 } 3758 if m.TxnErrCode != 0 { 3759 n += 1 + sovTxn(uint64(m.TxnErrCode)) 3760 } 3761 if m.XXX_unrecognized != nil { 3762 n += len(m.XXX_unrecognized) 3763 } 3764 return n 3765 } 3766 3767 func (m *TxnOptions) Size() (n int) { 3768 if m == nil { 3769 return 0 3770 } 3771 var l int 3772 _ = l 3773 if m.Features != 0 { 3774 n += 1 + sovTxn(uint64(m.Features)) 3775 } 3776 l = len(m.CN) 3777 if l > 0 { 3778 n += 1 + l + sovTxn(uint64(l)) 3779 } 3780 l = len(m.SessionID) 3781 if l > 0 { 3782 n += 1 + l + sovTxn(uint64(l)) 3783 } 3784 if m.AccountID != 0 { 3785 n += 1 + sovTxn(uint64(m.AccountID)) 3786 } 3787 if m.ConnectionID != 0 { 3788 n += 1 + sovTxn(uint64(m.ConnectionID)) 3789 } 3790 l = len(m.UserName) 3791 if l > 0 { 3792 n += 1 + l + sovTxn(uint64(l)) 3793 } 3794 if len(m.SkipLockTables) > 0 { 3795 l = 0 3796 for _, e := range m.SkipLockTables { 3797 l += sovTxn(uint64(e)) 3798 } 3799 n += 1 + sovTxn(uint64(l)) + l 3800 } 3801 if len(m.SkipLockTableModes) > 0 { 3802 l = 0 3803 for _, e := range m.SkipLockTableModes { 3804 l += sovTxn(uint64(e)) 3805 } 3806 n += 1 + sovTxn(uint64(l)) + l 3807 } 3808 l = len(m.Counter) 3809 if l > 0 { 3810 n += 1 + l + sovTxn(uint64(l)) 3811 } 3812 l = len(m.SessionInfo) 3813 if l > 0 { 3814 n += 1 + l + sovTxn(uint64(l)) 3815 } 3816 if m.InRunSql { 3817 n += 2 3818 } 3819 if m.InCommit { 3820 n += 2 3821 } 3822 if m.InRollback { 3823 n += 2 3824 } 3825 if m.XXX_unrecognized != nil { 3826 n += len(m.XXX_unrecognized) 3827 } 3828 return n 3829 } 3830 3831 func sovTxn(x uint64) (n int) { 3832 return (math_bits.Len64(x|1) + 6) / 7 3833 } 3834 func sozTxn(x uint64) (n int) { 3835 return sovTxn(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 3836 } 3837 func (m *TxnMeta) Unmarshal(dAtA []byte) error { 3838 l := len(dAtA) 3839 iNdEx := 0 3840 for iNdEx < l { 3841 preIndex := iNdEx 3842 var wire uint64 3843 for shift := uint(0); ; shift += 7 { 3844 if shift >= 64 { 3845 return ErrIntOverflowTxn 3846 } 3847 if iNdEx >= l { 3848 return io.ErrUnexpectedEOF 3849 } 3850 b := dAtA[iNdEx] 3851 iNdEx++ 3852 wire |= uint64(b&0x7F) << shift 3853 if b < 0x80 { 3854 break 3855 } 3856 } 3857 fieldNum := int32(wire >> 3) 3858 wireType := int(wire & 0x7) 3859 if wireType == 4 { 3860 return fmt.Errorf("proto: TxnMeta: wiretype end group for non-group") 3861 } 3862 if fieldNum <= 0 { 3863 return fmt.Errorf("proto: TxnMeta: illegal tag %d (wire type %d)", fieldNum, wire) 3864 } 3865 switch fieldNum { 3866 case 1: 3867 if wireType != 2 { 3868 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 3869 } 3870 var byteLen int 3871 for shift := uint(0); ; shift += 7 { 3872 if shift >= 64 { 3873 return ErrIntOverflowTxn 3874 } 3875 if iNdEx >= l { 3876 return io.ErrUnexpectedEOF 3877 } 3878 b := dAtA[iNdEx] 3879 iNdEx++ 3880 byteLen |= int(b&0x7F) << shift 3881 if b < 0x80 { 3882 break 3883 } 3884 } 3885 if byteLen < 0 { 3886 return ErrInvalidLengthTxn 3887 } 3888 postIndex := iNdEx + byteLen 3889 if postIndex < 0 { 3890 return ErrInvalidLengthTxn 3891 } 3892 if postIndex > l { 3893 return io.ErrUnexpectedEOF 3894 } 3895 m.ID = append(m.ID[:0], dAtA[iNdEx:postIndex]...) 3896 if m.ID == nil { 3897 m.ID = []byte{} 3898 } 3899 iNdEx = postIndex 3900 case 2: 3901 if wireType != 0 { 3902 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 3903 } 3904 m.Status = 0 3905 for shift := uint(0); ; shift += 7 { 3906 if shift >= 64 { 3907 return ErrIntOverflowTxn 3908 } 3909 if iNdEx >= l { 3910 return io.ErrUnexpectedEOF 3911 } 3912 b := dAtA[iNdEx] 3913 iNdEx++ 3914 m.Status |= TxnStatus(b&0x7F) << shift 3915 if b < 0x80 { 3916 break 3917 } 3918 } 3919 case 3: 3920 if wireType != 2 { 3921 return fmt.Errorf("proto: wrong wireType = %d for field SnapshotTS", wireType) 3922 } 3923 var msglen int 3924 for shift := uint(0); ; shift += 7 { 3925 if shift >= 64 { 3926 return ErrIntOverflowTxn 3927 } 3928 if iNdEx >= l { 3929 return io.ErrUnexpectedEOF 3930 } 3931 b := dAtA[iNdEx] 3932 iNdEx++ 3933 msglen |= int(b&0x7F) << shift 3934 if b < 0x80 { 3935 break 3936 } 3937 } 3938 if msglen < 0 { 3939 return ErrInvalidLengthTxn 3940 } 3941 postIndex := iNdEx + msglen 3942 if postIndex < 0 { 3943 return ErrInvalidLengthTxn 3944 } 3945 if postIndex > l { 3946 return io.ErrUnexpectedEOF 3947 } 3948 if err := m.SnapshotTS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3949 return err 3950 } 3951 iNdEx = postIndex 3952 case 4: 3953 if wireType != 2 { 3954 return fmt.Errorf("proto: wrong wireType = %d for field PreparedTS", wireType) 3955 } 3956 var msglen int 3957 for shift := uint(0); ; shift += 7 { 3958 if shift >= 64 { 3959 return ErrIntOverflowTxn 3960 } 3961 if iNdEx >= l { 3962 return io.ErrUnexpectedEOF 3963 } 3964 b := dAtA[iNdEx] 3965 iNdEx++ 3966 msglen |= int(b&0x7F) << shift 3967 if b < 0x80 { 3968 break 3969 } 3970 } 3971 if msglen < 0 { 3972 return ErrInvalidLengthTxn 3973 } 3974 postIndex := iNdEx + msglen 3975 if postIndex < 0 { 3976 return ErrInvalidLengthTxn 3977 } 3978 if postIndex > l { 3979 return io.ErrUnexpectedEOF 3980 } 3981 if err := m.PreparedTS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3982 return err 3983 } 3984 iNdEx = postIndex 3985 case 5: 3986 if wireType != 2 { 3987 return fmt.Errorf("proto: wrong wireType = %d for field CommitTS", wireType) 3988 } 3989 var msglen int 3990 for shift := uint(0); ; shift += 7 { 3991 if shift >= 64 { 3992 return ErrIntOverflowTxn 3993 } 3994 if iNdEx >= l { 3995 return io.ErrUnexpectedEOF 3996 } 3997 b := dAtA[iNdEx] 3998 iNdEx++ 3999 msglen |= int(b&0x7F) << shift 4000 if b < 0x80 { 4001 break 4002 } 4003 } 4004 if msglen < 0 { 4005 return ErrInvalidLengthTxn 4006 } 4007 postIndex := iNdEx + msglen 4008 if postIndex < 0 { 4009 return ErrInvalidLengthTxn 4010 } 4011 if postIndex > l { 4012 return io.ErrUnexpectedEOF 4013 } 4014 if err := m.CommitTS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4015 return err 4016 } 4017 iNdEx = postIndex 4018 case 6: 4019 if wireType != 2 { 4020 return fmt.Errorf("proto: wrong wireType = %d for field TNShards", wireType) 4021 } 4022 var msglen int 4023 for shift := uint(0); ; shift += 7 { 4024 if shift >= 64 { 4025 return ErrIntOverflowTxn 4026 } 4027 if iNdEx >= l { 4028 return io.ErrUnexpectedEOF 4029 } 4030 b := dAtA[iNdEx] 4031 iNdEx++ 4032 msglen |= int(b&0x7F) << shift 4033 if b < 0x80 { 4034 break 4035 } 4036 } 4037 if msglen < 0 { 4038 return ErrInvalidLengthTxn 4039 } 4040 postIndex := iNdEx + msglen 4041 if postIndex < 0 { 4042 return ErrInvalidLengthTxn 4043 } 4044 if postIndex > l { 4045 return io.ErrUnexpectedEOF 4046 } 4047 m.TNShards = append(m.TNShards, metadata.TNShard{}) 4048 if err := m.TNShards[len(m.TNShards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4049 return err 4050 } 4051 iNdEx = postIndex 4052 case 7: 4053 if wireType != 2 { 4054 return fmt.Errorf("proto: wrong wireType = %d for field LockTables", wireType) 4055 } 4056 var msglen int 4057 for shift := uint(0); ; shift += 7 { 4058 if shift >= 64 { 4059 return ErrIntOverflowTxn 4060 } 4061 if iNdEx >= l { 4062 return io.ErrUnexpectedEOF 4063 } 4064 b := dAtA[iNdEx] 4065 iNdEx++ 4066 msglen |= int(b&0x7F) << shift 4067 if b < 0x80 { 4068 break 4069 } 4070 } 4071 if msglen < 0 { 4072 return ErrInvalidLengthTxn 4073 } 4074 postIndex := iNdEx + msglen 4075 if postIndex < 0 { 4076 return ErrInvalidLengthTxn 4077 } 4078 if postIndex > l { 4079 return io.ErrUnexpectedEOF 4080 } 4081 m.LockTables = append(m.LockTables, lock.LockTable{}) 4082 if err := m.LockTables[len(m.LockTables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4083 return err 4084 } 4085 iNdEx = postIndex 4086 case 8: 4087 if wireType != 0 { 4088 return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) 4089 } 4090 m.Mode = 0 4091 for shift := uint(0); ; shift += 7 { 4092 if shift >= 64 { 4093 return ErrIntOverflowTxn 4094 } 4095 if iNdEx >= l { 4096 return io.ErrUnexpectedEOF 4097 } 4098 b := dAtA[iNdEx] 4099 iNdEx++ 4100 m.Mode |= TxnMode(b&0x7F) << shift 4101 if b < 0x80 { 4102 break 4103 } 4104 } 4105 case 9: 4106 if wireType != 0 { 4107 return fmt.Errorf("proto: wrong wireType = %d for field Isolation", wireType) 4108 } 4109 m.Isolation = 0 4110 for shift := uint(0); ; shift += 7 { 4111 if shift >= 64 { 4112 return ErrIntOverflowTxn 4113 } 4114 if iNdEx >= l { 4115 return io.ErrUnexpectedEOF 4116 } 4117 b := dAtA[iNdEx] 4118 iNdEx++ 4119 m.Isolation |= TxnIsolation(b&0x7F) << shift 4120 if b < 0x80 { 4121 break 4122 } 4123 } 4124 case 10: 4125 if wireType != 0 { 4126 return fmt.Errorf("proto: wrong wireType = %d for field Mirror", wireType) 4127 } 4128 var v int 4129 for shift := uint(0); ; shift += 7 { 4130 if shift >= 64 { 4131 return ErrIntOverflowTxn 4132 } 4133 if iNdEx >= l { 4134 return io.ErrUnexpectedEOF 4135 } 4136 b := dAtA[iNdEx] 4137 iNdEx++ 4138 v |= int(b&0x7F) << shift 4139 if b < 0x80 { 4140 break 4141 } 4142 } 4143 m.Mirror = bool(v != 0) 4144 case 11: 4145 if wireType != 2 { 4146 return fmt.Errorf("proto: wrong wireType = %d for field LockService", wireType) 4147 } 4148 var stringLen uint64 4149 for shift := uint(0); ; shift += 7 { 4150 if shift >= 64 { 4151 return ErrIntOverflowTxn 4152 } 4153 if iNdEx >= l { 4154 return io.ErrUnexpectedEOF 4155 } 4156 b := dAtA[iNdEx] 4157 iNdEx++ 4158 stringLen |= uint64(b&0x7F) << shift 4159 if b < 0x80 { 4160 break 4161 } 4162 } 4163 intStringLen := int(stringLen) 4164 if intStringLen < 0 { 4165 return ErrInvalidLengthTxn 4166 } 4167 postIndex := iNdEx + intStringLen 4168 if postIndex < 0 { 4169 return ErrInvalidLengthTxn 4170 } 4171 if postIndex > l { 4172 return io.ErrUnexpectedEOF 4173 } 4174 m.LockService = string(dAtA[iNdEx:postIndex]) 4175 iNdEx = postIndex 4176 default: 4177 iNdEx = preIndex 4178 skippy, err := skipTxn(dAtA[iNdEx:]) 4179 if err != nil { 4180 return err 4181 } 4182 if (skippy < 0) || (iNdEx+skippy) < 0 { 4183 return ErrInvalidLengthTxn 4184 } 4185 if (iNdEx + skippy) > l { 4186 return io.ErrUnexpectedEOF 4187 } 4188 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4189 iNdEx += skippy 4190 } 4191 } 4192 4193 if iNdEx > l { 4194 return io.ErrUnexpectedEOF 4195 } 4196 return nil 4197 } 4198 func (m *CNTxnSnapshot) Unmarshal(dAtA []byte) error { 4199 l := len(dAtA) 4200 iNdEx := 0 4201 for iNdEx < l { 4202 preIndex := iNdEx 4203 var wire uint64 4204 for shift := uint(0); ; shift += 7 { 4205 if shift >= 64 { 4206 return ErrIntOverflowTxn 4207 } 4208 if iNdEx >= l { 4209 return io.ErrUnexpectedEOF 4210 } 4211 b := dAtA[iNdEx] 4212 iNdEx++ 4213 wire |= uint64(b&0x7F) << shift 4214 if b < 0x80 { 4215 break 4216 } 4217 } 4218 fieldNum := int32(wire >> 3) 4219 wireType := int(wire & 0x7) 4220 if wireType == 4 { 4221 return fmt.Errorf("proto: CNTxnSnapshot: wiretype end group for non-group") 4222 } 4223 if fieldNum <= 0 { 4224 return fmt.Errorf("proto: CNTxnSnapshot: illegal tag %d (wire type %d)", fieldNum, wire) 4225 } 4226 switch fieldNum { 4227 case 1: 4228 if wireType != 2 { 4229 return fmt.Errorf("proto: wrong wireType = %d for field Txn", wireType) 4230 } 4231 var msglen int 4232 for shift := uint(0); ; shift += 7 { 4233 if shift >= 64 { 4234 return ErrIntOverflowTxn 4235 } 4236 if iNdEx >= l { 4237 return io.ErrUnexpectedEOF 4238 } 4239 b := dAtA[iNdEx] 4240 iNdEx++ 4241 msglen |= int(b&0x7F) << shift 4242 if b < 0x80 { 4243 break 4244 } 4245 } 4246 if msglen < 0 { 4247 return ErrInvalidLengthTxn 4248 } 4249 postIndex := iNdEx + msglen 4250 if postIndex < 0 { 4251 return ErrInvalidLengthTxn 4252 } 4253 if postIndex > l { 4254 return io.ErrUnexpectedEOF 4255 } 4256 if err := m.Txn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4257 return err 4258 } 4259 iNdEx = postIndex 4260 case 2: 4261 if wireType != 0 { 4262 return fmt.Errorf("proto: wrong wireType = %d for field ReadyOnly", wireType) 4263 } 4264 var v int 4265 for shift := uint(0); ; shift += 7 { 4266 if shift >= 64 { 4267 return ErrIntOverflowTxn 4268 } 4269 if iNdEx >= l { 4270 return io.ErrUnexpectedEOF 4271 } 4272 b := dAtA[iNdEx] 4273 iNdEx++ 4274 v |= int(b&0x7F) << shift 4275 if b < 0x80 { 4276 break 4277 } 4278 } 4279 m.ReadyOnly = bool(v != 0) 4280 case 3: 4281 if wireType != 0 { 4282 return fmt.Errorf("proto: wrong wireType = %d for field EnableCacheWrite", wireType) 4283 } 4284 var v int 4285 for shift := uint(0); ; shift += 7 { 4286 if shift >= 64 { 4287 return ErrIntOverflowTxn 4288 } 4289 if iNdEx >= l { 4290 return io.ErrUnexpectedEOF 4291 } 4292 b := dAtA[iNdEx] 4293 iNdEx++ 4294 v |= int(b&0x7F) << shift 4295 if b < 0x80 { 4296 break 4297 } 4298 } 4299 m.EnableCacheWrite = bool(v != 0) 4300 case 4: 4301 if wireType != 0 { 4302 return fmt.Errorf("proto: wrong wireType = %d for field Disable1PCOpt", wireType) 4303 } 4304 var v int 4305 for shift := uint(0); ; shift += 7 { 4306 if shift >= 64 { 4307 return ErrIntOverflowTxn 4308 } 4309 if iNdEx >= l { 4310 return io.ErrUnexpectedEOF 4311 } 4312 b := dAtA[iNdEx] 4313 iNdEx++ 4314 v |= int(b&0x7F) << shift 4315 if b < 0x80 { 4316 break 4317 } 4318 } 4319 m.Disable1PCOpt = bool(v != 0) 4320 case 5: 4321 if wireType != 2 { 4322 return fmt.Errorf("proto: wrong wireType = %d for field LockTables", wireType) 4323 } 4324 var msglen int 4325 for shift := uint(0); ; shift += 7 { 4326 if shift >= 64 { 4327 return ErrIntOverflowTxn 4328 } 4329 if iNdEx >= l { 4330 return io.ErrUnexpectedEOF 4331 } 4332 b := dAtA[iNdEx] 4333 iNdEx++ 4334 msglen |= int(b&0x7F) << shift 4335 if b < 0x80 { 4336 break 4337 } 4338 } 4339 if msglen < 0 { 4340 return ErrInvalidLengthTxn 4341 } 4342 postIndex := iNdEx + msglen 4343 if postIndex < 0 { 4344 return ErrInvalidLengthTxn 4345 } 4346 if postIndex > l { 4347 return io.ErrUnexpectedEOF 4348 } 4349 m.LockTables = append(m.LockTables, lock.LockTable{}) 4350 if err := m.LockTables[len(m.LockTables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4351 return err 4352 } 4353 iNdEx = postIndex 4354 case 6: 4355 if wireType != 2 { 4356 return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 4357 } 4358 var msglen int 4359 for shift := uint(0); ; shift += 7 { 4360 if shift >= 64 { 4361 return ErrIntOverflowTxn 4362 } 4363 if iNdEx >= l { 4364 return io.ErrUnexpectedEOF 4365 } 4366 b := dAtA[iNdEx] 4367 iNdEx++ 4368 msglen |= int(b&0x7F) << shift 4369 if b < 0x80 { 4370 break 4371 } 4372 } 4373 if msglen < 0 { 4374 return ErrInvalidLengthTxn 4375 } 4376 postIndex := iNdEx + msglen 4377 if postIndex < 0 { 4378 return ErrInvalidLengthTxn 4379 } 4380 if postIndex > l { 4381 return io.ErrUnexpectedEOF 4382 } 4383 if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4384 return err 4385 } 4386 iNdEx = postIndex 4387 default: 4388 iNdEx = preIndex 4389 skippy, err := skipTxn(dAtA[iNdEx:]) 4390 if err != nil { 4391 return err 4392 } 4393 if (skippy < 0) || (iNdEx+skippy) < 0 { 4394 return ErrInvalidLengthTxn 4395 } 4396 if (iNdEx + skippy) > l { 4397 return io.ErrUnexpectedEOF 4398 } 4399 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4400 iNdEx += skippy 4401 } 4402 } 4403 4404 if iNdEx > l { 4405 return io.ErrUnexpectedEOF 4406 } 4407 return nil 4408 } 4409 func (m *CNOpRequest) Unmarshal(dAtA []byte) error { 4410 l := len(dAtA) 4411 iNdEx := 0 4412 for iNdEx < l { 4413 preIndex := iNdEx 4414 var wire uint64 4415 for shift := uint(0); ; shift += 7 { 4416 if shift >= 64 { 4417 return ErrIntOverflowTxn 4418 } 4419 if iNdEx >= l { 4420 return io.ErrUnexpectedEOF 4421 } 4422 b := dAtA[iNdEx] 4423 iNdEx++ 4424 wire |= uint64(b&0x7F) << shift 4425 if b < 0x80 { 4426 break 4427 } 4428 } 4429 fieldNum := int32(wire >> 3) 4430 wireType := int(wire & 0x7) 4431 if wireType == 4 { 4432 return fmt.Errorf("proto: CNOpRequest: wiretype end group for non-group") 4433 } 4434 if fieldNum <= 0 { 4435 return fmt.Errorf("proto: CNOpRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4436 } 4437 switch fieldNum { 4438 case 1: 4439 if wireType != 0 { 4440 return fmt.Errorf("proto: wrong wireType = %d for field OpCode", wireType) 4441 } 4442 m.OpCode = 0 4443 for shift := uint(0); ; shift += 7 { 4444 if shift >= 64 { 4445 return ErrIntOverflowTxn 4446 } 4447 if iNdEx >= l { 4448 return io.ErrUnexpectedEOF 4449 } 4450 b := dAtA[iNdEx] 4451 iNdEx++ 4452 m.OpCode |= uint32(b&0x7F) << shift 4453 if b < 0x80 { 4454 break 4455 } 4456 } 4457 case 2: 4458 if wireType != 2 { 4459 return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) 4460 } 4461 var byteLen int 4462 for shift := uint(0); ; shift += 7 { 4463 if shift >= 64 { 4464 return ErrIntOverflowTxn 4465 } 4466 if iNdEx >= l { 4467 return io.ErrUnexpectedEOF 4468 } 4469 b := dAtA[iNdEx] 4470 iNdEx++ 4471 byteLen |= int(b&0x7F) << shift 4472 if b < 0x80 { 4473 break 4474 } 4475 } 4476 if byteLen < 0 { 4477 return ErrInvalidLengthTxn 4478 } 4479 postIndex := iNdEx + byteLen 4480 if postIndex < 0 { 4481 return ErrInvalidLengthTxn 4482 } 4483 if postIndex > l { 4484 return io.ErrUnexpectedEOF 4485 } 4486 m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) 4487 if m.Payload == nil { 4488 m.Payload = []byte{} 4489 } 4490 iNdEx = postIndex 4491 case 3: 4492 if wireType != 2 { 4493 return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) 4494 } 4495 var msglen int 4496 for shift := uint(0); ; shift += 7 { 4497 if shift >= 64 { 4498 return ErrIntOverflowTxn 4499 } 4500 if iNdEx >= l { 4501 return io.ErrUnexpectedEOF 4502 } 4503 b := dAtA[iNdEx] 4504 iNdEx++ 4505 msglen |= int(b&0x7F) << shift 4506 if b < 0x80 { 4507 break 4508 } 4509 } 4510 if msglen < 0 { 4511 return ErrInvalidLengthTxn 4512 } 4513 postIndex := iNdEx + msglen 4514 if postIndex < 0 { 4515 return ErrInvalidLengthTxn 4516 } 4517 if postIndex > l { 4518 return io.ErrUnexpectedEOF 4519 } 4520 if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4521 return err 4522 } 4523 iNdEx = postIndex 4524 default: 4525 iNdEx = preIndex 4526 skippy, err := skipTxn(dAtA[iNdEx:]) 4527 if err != nil { 4528 return err 4529 } 4530 if (skippy < 0) || (iNdEx+skippy) < 0 { 4531 return ErrInvalidLengthTxn 4532 } 4533 if (iNdEx + skippy) > l { 4534 return io.ErrUnexpectedEOF 4535 } 4536 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4537 iNdEx += skippy 4538 } 4539 } 4540 4541 if iNdEx > l { 4542 return io.ErrUnexpectedEOF 4543 } 4544 return nil 4545 } 4546 func (m *CNOpResponse) Unmarshal(dAtA []byte) error { 4547 l := len(dAtA) 4548 iNdEx := 0 4549 for iNdEx < l { 4550 preIndex := iNdEx 4551 var wire uint64 4552 for shift := uint(0); ; shift += 7 { 4553 if shift >= 64 { 4554 return ErrIntOverflowTxn 4555 } 4556 if iNdEx >= l { 4557 return io.ErrUnexpectedEOF 4558 } 4559 b := dAtA[iNdEx] 4560 iNdEx++ 4561 wire |= uint64(b&0x7F) << shift 4562 if b < 0x80 { 4563 break 4564 } 4565 } 4566 fieldNum := int32(wire >> 3) 4567 wireType := int(wire & 0x7) 4568 if wireType == 4 { 4569 return fmt.Errorf("proto: CNOpResponse: wiretype end group for non-group") 4570 } 4571 if fieldNum <= 0 { 4572 return fmt.Errorf("proto: CNOpResponse: illegal tag %d (wire type %d)", fieldNum, wire) 4573 } 4574 switch fieldNum { 4575 case 1: 4576 if wireType != 2 { 4577 return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) 4578 } 4579 var byteLen int 4580 for shift := uint(0); ; shift += 7 { 4581 if shift >= 64 { 4582 return ErrIntOverflowTxn 4583 } 4584 if iNdEx >= l { 4585 return io.ErrUnexpectedEOF 4586 } 4587 b := dAtA[iNdEx] 4588 iNdEx++ 4589 byteLen |= int(b&0x7F) << shift 4590 if b < 0x80 { 4591 break 4592 } 4593 } 4594 if byteLen < 0 { 4595 return ErrInvalidLengthTxn 4596 } 4597 postIndex := iNdEx + byteLen 4598 if postIndex < 0 { 4599 return ErrInvalidLengthTxn 4600 } 4601 if postIndex > l { 4602 return io.ErrUnexpectedEOF 4603 } 4604 m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) 4605 if m.Payload == nil { 4606 m.Payload = []byte{} 4607 } 4608 iNdEx = postIndex 4609 default: 4610 iNdEx = preIndex 4611 skippy, err := skipTxn(dAtA[iNdEx:]) 4612 if err != nil { 4613 return err 4614 } 4615 if (skippy < 0) || (iNdEx+skippy) < 0 { 4616 return ErrInvalidLengthTxn 4617 } 4618 if (iNdEx + skippy) > l { 4619 return io.ErrUnexpectedEOF 4620 } 4621 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 4622 iNdEx += skippy 4623 } 4624 } 4625 4626 if iNdEx > l { 4627 return io.ErrUnexpectedEOF 4628 } 4629 return nil 4630 } 4631 func (m *TxnRequest) Unmarshal(dAtA []byte) error { 4632 l := len(dAtA) 4633 iNdEx := 0 4634 for iNdEx < l { 4635 preIndex := iNdEx 4636 var wire uint64 4637 for shift := uint(0); ; shift += 7 { 4638 if shift >= 64 { 4639 return ErrIntOverflowTxn 4640 } 4641 if iNdEx >= l { 4642 return io.ErrUnexpectedEOF 4643 } 4644 b := dAtA[iNdEx] 4645 iNdEx++ 4646 wire |= uint64(b&0x7F) << shift 4647 if b < 0x80 { 4648 break 4649 } 4650 } 4651 fieldNum := int32(wire >> 3) 4652 wireType := int(wire & 0x7) 4653 if wireType == 4 { 4654 return fmt.Errorf("proto: TxnRequest: wiretype end group for non-group") 4655 } 4656 if fieldNum <= 0 { 4657 return fmt.Errorf("proto: TxnRequest: illegal tag %d (wire type %d)", fieldNum, wire) 4658 } 4659 switch fieldNum { 4660 case 1: 4661 if wireType != 0 { 4662 return fmt.Errorf("proto: wrong wireType = %d for field RequestID", wireType) 4663 } 4664 m.RequestID = 0 4665 for shift := uint(0); ; shift += 7 { 4666 if shift >= 64 { 4667 return ErrIntOverflowTxn 4668 } 4669 if iNdEx >= l { 4670 return io.ErrUnexpectedEOF 4671 } 4672 b := dAtA[iNdEx] 4673 iNdEx++ 4674 m.RequestID |= uint64(b&0x7F) << shift 4675 if b < 0x80 { 4676 break 4677 } 4678 } 4679 case 2: 4680 if wireType != 2 { 4681 return fmt.Errorf("proto: wrong wireType = %d for field Txn", wireType) 4682 } 4683 var msglen int 4684 for shift := uint(0); ; shift += 7 { 4685 if shift >= 64 { 4686 return ErrIntOverflowTxn 4687 } 4688 if iNdEx >= l { 4689 return io.ErrUnexpectedEOF 4690 } 4691 b := dAtA[iNdEx] 4692 iNdEx++ 4693 msglen |= int(b&0x7F) << shift 4694 if b < 0x80 { 4695 break 4696 } 4697 } 4698 if msglen < 0 { 4699 return ErrInvalidLengthTxn 4700 } 4701 postIndex := iNdEx + msglen 4702 if postIndex < 0 { 4703 return ErrInvalidLengthTxn 4704 } 4705 if postIndex > l { 4706 return io.ErrUnexpectedEOF 4707 } 4708 if err := m.Txn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4709 return err 4710 } 4711 iNdEx = postIndex 4712 case 3: 4713 if wireType != 0 { 4714 return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) 4715 } 4716 m.Method = 0 4717 for shift := uint(0); ; shift += 7 { 4718 if shift >= 64 { 4719 return ErrIntOverflowTxn 4720 } 4721 if iNdEx >= l { 4722 return io.ErrUnexpectedEOF 4723 } 4724 b := dAtA[iNdEx] 4725 iNdEx++ 4726 m.Method |= TxnMethod(b&0x7F) << shift 4727 if b < 0x80 { 4728 break 4729 } 4730 } 4731 case 4: 4732 if wireType != 0 { 4733 return fmt.Errorf("proto: wrong wireType = %d for field Flag", wireType) 4734 } 4735 m.Flag = 0 4736 for shift := uint(0); ; shift += 7 { 4737 if shift >= 64 { 4738 return ErrIntOverflowTxn 4739 } 4740 if iNdEx >= l { 4741 return io.ErrUnexpectedEOF 4742 } 4743 b := dAtA[iNdEx] 4744 iNdEx++ 4745 m.Flag |= uint32(b&0x7F) << shift 4746 if b < 0x80 { 4747 break 4748 } 4749 } 4750 case 5: 4751 if wireType != 2 { 4752 return fmt.Errorf("proto: wrong wireType = %d for field CNRequest", wireType) 4753 } 4754 var msglen int 4755 for shift := uint(0); ; shift += 7 { 4756 if shift >= 64 { 4757 return ErrIntOverflowTxn 4758 } 4759 if iNdEx >= l { 4760 return io.ErrUnexpectedEOF 4761 } 4762 b := dAtA[iNdEx] 4763 iNdEx++ 4764 msglen |= int(b&0x7F) << shift 4765 if b < 0x80 { 4766 break 4767 } 4768 } 4769 if msglen < 0 { 4770 return ErrInvalidLengthTxn 4771 } 4772 postIndex := iNdEx + msglen 4773 if postIndex < 0 { 4774 return ErrInvalidLengthTxn 4775 } 4776 if postIndex > l { 4777 return io.ErrUnexpectedEOF 4778 } 4779 if m.CNRequest == nil { 4780 m.CNRequest = &CNOpRequest{} 4781 } 4782 if err := m.CNRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4783 return err 4784 } 4785 iNdEx = postIndex 4786 case 6: 4787 if wireType != 2 { 4788 return fmt.Errorf("proto: wrong wireType = %d for field CommitRequest", wireType) 4789 } 4790 var msglen int 4791 for shift := uint(0); ; shift += 7 { 4792 if shift >= 64 { 4793 return ErrIntOverflowTxn 4794 } 4795 if iNdEx >= l { 4796 return io.ErrUnexpectedEOF 4797 } 4798 b := dAtA[iNdEx] 4799 iNdEx++ 4800 msglen |= int(b&0x7F) << shift 4801 if b < 0x80 { 4802 break 4803 } 4804 } 4805 if msglen < 0 { 4806 return ErrInvalidLengthTxn 4807 } 4808 postIndex := iNdEx + msglen 4809 if postIndex < 0 { 4810 return ErrInvalidLengthTxn 4811 } 4812 if postIndex > l { 4813 return io.ErrUnexpectedEOF 4814 } 4815 if m.CommitRequest == nil { 4816 m.CommitRequest = &TxnCommitRequest{} 4817 } 4818 if err := m.CommitRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4819 return err 4820 } 4821 iNdEx = postIndex 4822 case 7: 4823 if wireType != 2 { 4824 return fmt.Errorf("proto: wrong wireType = %d for field RollbackRequest", wireType) 4825 } 4826 var msglen int 4827 for shift := uint(0); ; shift += 7 { 4828 if shift >= 64 { 4829 return ErrIntOverflowTxn 4830 } 4831 if iNdEx >= l { 4832 return io.ErrUnexpectedEOF 4833 } 4834 b := dAtA[iNdEx] 4835 iNdEx++ 4836 msglen |= int(b&0x7F) << shift 4837 if b < 0x80 { 4838 break 4839 } 4840 } 4841 if msglen < 0 { 4842 return ErrInvalidLengthTxn 4843 } 4844 postIndex := iNdEx + msglen 4845 if postIndex < 0 { 4846 return ErrInvalidLengthTxn 4847 } 4848 if postIndex > l { 4849 return io.ErrUnexpectedEOF 4850 } 4851 if m.RollbackRequest == nil { 4852 m.RollbackRequest = &TxnRollbackRequest{} 4853 } 4854 if err := m.RollbackRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4855 return err 4856 } 4857 iNdEx = postIndex 4858 case 8: 4859 if wireType != 2 { 4860 return fmt.Errorf("proto: wrong wireType = %d for field PrepareRequest", wireType) 4861 } 4862 var msglen int 4863 for shift := uint(0); ; shift += 7 { 4864 if shift >= 64 { 4865 return ErrIntOverflowTxn 4866 } 4867 if iNdEx >= l { 4868 return io.ErrUnexpectedEOF 4869 } 4870 b := dAtA[iNdEx] 4871 iNdEx++ 4872 msglen |= int(b&0x7F) << shift 4873 if b < 0x80 { 4874 break 4875 } 4876 } 4877 if msglen < 0 { 4878 return ErrInvalidLengthTxn 4879 } 4880 postIndex := iNdEx + msglen 4881 if postIndex < 0 { 4882 return ErrInvalidLengthTxn 4883 } 4884 if postIndex > l { 4885 return io.ErrUnexpectedEOF 4886 } 4887 if m.PrepareRequest == nil { 4888 m.PrepareRequest = &TxnPrepareRequest{} 4889 } 4890 if err := m.PrepareRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4891 return err 4892 } 4893 iNdEx = postIndex 4894 case 9: 4895 if wireType != 2 { 4896 return fmt.Errorf("proto: wrong wireType = %d for field GetStatusRequest", wireType) 4897 } 4898 var msglen int 4899 for shift := uint(0); ; shift += 7 { 4900 if shift >= 64 { 4901 return ErrIntOverflowTxn 4902 } 4903 if iNdEx >= l { 4904 return io.ErrUnexpectedEOF 4905 } 4906 b := dAtA[iNdEx] 4907 iNdEx++ 4908 msglen |= int(b&0x7F) << shift 4909 if b < 0x80 { 4910 break 4911 } 4912 } 4913 if msglen < 0 { 4914 return ErrInvalidLengthTxn 4915 } 4916 postIndex := iNdEx + msglen 4917 if postIndex < 0 { 4918 return ErrInvalidLengthTxn 4919 } 4920 if postIndex > l { 4921 return io.ErrUnexpectedEOF 4922 } 4923 if m.GetStatusRequest == nil { 4924 m.GetStatusRequest = &TxnGetStatusRequest{} 4925 } 4926 if err := m.GetStatusRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4927 return err 4928 } 4929 iNdEx = postIndex 4930 case 10: 4931 if wireType != 2 { 4932 return fmt.Errorf("proto: wrong wireType = %d for field CommitTNShardRequest", wireType) 4933 } 4934 var msglen int 4935 for shift := uint(0); ; shift += 7 { 4936 if shift >= 64 { 4937 return ErrIntOverflowTxn 4938 } 4939 if iNdEx >= l { 4940 return io.ErrUnexpectedEOF 4941 } 4942 b := dAtA[iNdEx] 4943 iNdEx++ 4944 msglen |= int(b&0x7F) << shift 4945 if b < 0x80 { 4946 break 4947 } 4948 } 4949 if msglen < 0 { 4950 return ErrInvalidLengthTxn 4951 } 4952 postIndex := iNdEx + msglen 4953 if postIndex < 0 { 4954 return ErrInvalidLengthTxn 4955 } 4956 if postIndex > l { 4957 return io.ErrUnexpectedEOF 4958 } 4959 if m.CommitTNShardRequest == nil { 4960 m.CommitTNShardRequest = &TxnCommitTNShardRequest{} 4961 } 4962 if err := m.CommitTNShardRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4963 return err 4964 } 4965 iNdEx = postIndex 4966 case 11: 4967 if wireType != 2 { 4968 return fmt.Errorf("proto: wrong wireType = %d for field RollbackTNShardRequest", wireType) 4969 } 4970 var msglen int 4971 for shift := uint(0); ; shift += 7 { 4972 if shift >= 64 { 4973 return ErrIntOverflowTxn 4974 } 4975 if iNdEx >= l { 4976 return io.ErrUnexpectedEOF 4977 } 4978 b := dAtA[iNdEx] 4979 iNdEx++ 4980 msglen |= int(b&0x7F) << shift 4981 if b < 0x80 { 4982 break 4983 } 4984 } 4985 if msglen < 0 { 4986 return ErrInvalidLengthTxn 4987 } 4988 postIndex := iNdEx + msglen 4989 if postIndex < 0 { 4990 return ErrInvalidLengthTxn 4991 } 4992 if postIndex > l { 4993 return io.ErrUnexpectedEOF 4994 } 4995 if m.RollbackTNShardRequest == nil { 4996 m.RollbackTNShardRequest = &TxnRollbackTNShardRequest{} 4997 } 4998 if err := m.RollbackTNShardRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4999 return err 5000 } 5001 iNdEx = postIndex 5002 case 12: 5003 if wireType != 2 { 5004 return fmt.Errorf("proto: wrong wireType = %d for field RemoveMetadata", wireType) 5005 } 5006 var msglen int 5007 for shift := uint(0); ; shift += 7 { 5008 if shift >= 64 { 5009 return ErrIntOverflowTxn 5010 } 5011 if iNdEx >= l { 5012 return io.ErrUnexpectedEOF 5013 } 5014 b := dAtA[iNdEx] 5015 iNdEx++ 5016 msglen |= int(b&0x7F) << shift 5017 if b < 0x80 { 5018 break 5019 } 5020 } 5021 if msglen < 0 { 5022 return ErrInvalidLengthTxn 5023 } 5024 postIndex := iNdEx + msglen 5025 if postIndex < 0 { 5026 return ErrInvalidLengthTxn 5027 } 5028 if postIndex > l { 5029 return io.ErrUnexpectedEOF 5030 } 5031 if m.RemoveMetadata == nil { 5032 m.RemoveMetadata = &TxnRemoveMetadataRequest{} 5033 } 5034 if err := m.RemoveMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5035 return err 5036 } 5037 iNdEx = postIndex 5038 case 13: 5039 if wireType != 2 { 5040 return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 5041 } 5042 var msglen int 5043 for shift := uint(0); ; shift += 7 { 5044 if shift >= 64 { 5045 return ErrIntOverflowTxn 5046 } 5047 if iNdEx >= l { 5048 return io.ErrUnexpectedEOF 5049 } 5050 b := dAtA[iNdEx] 5051 iNdEx++ 5052 msglen |= int(b&0x7F) << shift 5053 if b < 0x80 { 5054 break 5055 } 5056 } 5057 if msglen < 0 { 5058 return ErrInvalidLengthTxn 5059 } 5060 postIndex := iNdEx + msglen 5061 if postIndex < 0 { 5062 return ErrInvalidLengthTxn 5063 } 5064 if postIndex > l { 5065 return io.ErrUnexpectedEOF 5066 } 5067 if m.Options == nil { 5068 m.Options = &TxnRequestOptions{} 5069 } 5070 if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5071 return err 5072 } 5073 iNdEx = postIndex 5074 default: 5075 iNdEx = preIndex 5076 skippy, err := skipTxn(dAtA[iNdEx:]) 5077 if err != nil { 5078 return err 5079 } 5080 if (skippy < 0) || (iNdEx+skippy) < 0 { 5081 return ErrInvalidLengthTxn 5082 } 5083 if (iNdEx + skippy) > l { 5084 return io.ErrUnexpectedEOF 5085 } 5086 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5087 iNdEx += skippy 5088 } 5089 } 5090 5091 if iNdEx > l { 5092 return io.ErrUnexpectedEOF 5093 } 5094 return nil 5095 } 5096 func (m *TxnRequestOptions) Unmarshal(dAtA []byte) error { 5097 l := len(dAtA) 5098 iNdEx := 0 5099 for iNdEx < l { 5100 preIndex := iNdEx 5101 var wire uint64 5102 for shift := uint(0); ; shift += 7 { 5103 if shift >= 64 { 5104 return ErrIntOverflowTxn 5105 } 5106 if iNdEx >= l { 5107 return io.ErrUnexpectedEOF 5108 } 5109 b := dAtA[iNdEx] 5110 iNdEx++ 5111 wire |= uint64(b&0x7F) << shift 5112 if b < 0x80 { 5113 break 5114 } 5115 } 5116 fieldNum := int32(wire >> 3) 5117 wireType := int(wire & 0x7) 5118 if wireType == 4 { 5119 return fmt.Errorf("proto: TxnRequestOptions: wiretype end group for non-group") 5120 } 5121 if fieldNum <= 0 { 5122 return fmt.Errorf("proto: TxnRequestOptions: illegal tag %d (wire type %d)", fieldNum, wire) 5123 } 5124 switch fieldNum { 5125 case 1: 5126 if wireType == 0 { 5127 var v int32 5128 for shift := uint(0); ; shift += 7 { 5129 if shift >= 64 { 5130 return ErrIntOverflowTxn 5131 } 5132 if iNdEx >= l { 5133 return io.ErrUnexpectedEOF 5134 } 5135 b := dAtA[iNdEx] 5136 iNdEx++ 5137 v |= int32(b&0x7F) << shift 5138 if b < 0x80 { 5139 break 5140 } 5141 } 5142 m.RetryCodes = append(m.RetryCodes, v) 5143 } else if wireType == 2 { 5144 var packedLen int 5145 for shift := uint(0); ; shift += 7 { 5146 if shift >= 64 { 5147 return ErrIntOverflowTxn 5148 } 5149 if iNdEx >= l { 5150 return io.ErrUnexpectedEOF 5151 } 5152 b := dAtA[iNdEx] 5153 iNdEx++ 5154 packedLen |= int(b&0x7F) << shift 5155 if b < 0x80 { 5156 break 5157 } 5158 } 5159 if packedLen < 0 { 5160 return ErrInvalidLengthTxn 5161 } 5162 postIndex := iNdEx + packedLen 5163 if postIndex < 0 { 5164 return ErrInvalidLengthTxn 5165 } 5166 if postIndex > l { 5167 return io.ErrUnexpectedEOF 5168 } 5169 var elementCount int 5170 var count int 5171 for _, integer := range dAtA[iNdEx:postIndex] { 5172 if integer < 128 { 5173 count++ 5174 } 5175 } 5176 elementCount = count 5177 if elementCount != 0 && len(m.RetryCodes) == 0 { 5178 m.RetryCodes = make([]int32, 0, elementCount) 5179 } 5180 for iNdEx < postIndex { 5181 var v int32 5182 for shift := uint(0); ; shift += 7 { 5183 if shift >= 64 { 5184 return ErrIntOverflowTxn 5185 } 5186 if iNdEx >= l { 5187 return io.ErrUnexpectedEOF 5188 } 5189 b := dAtA[iNdEx] 5190 iNdEx++ 5191 v |= int32(b&0x7F) << shift 5192 if b < 0x80 { 5193 break 5194 } 5195 } 5196 m.RetryCodes = append(m.RetryCodes, v) 5197 } 5198 } else { 5199 return fmt.Errorf("proto: wrong wireType = %d for field RetryCodes", wireType) 5200 } 5201 case 2: 5202 if wireType != 0 { 5203 return fmt.Errorf("proto: wrong wireType = %d for field RetryInterval", wireType) 5204 } 5205 m.RetryInterval = 0 5206 for shift := uint(0); ; shift += 7 { 5207 if shift >= 64 { 5208 return ErrIntOverflowTxn 5209 } 5210 if iNdEx >= l { 5211 return io.ErrUnexpectedEOF 5212 } 5213 b := dAtA[iNdEx] 5214 iNdEx++ 5215 m.RetryInterval |= int64(b&0x7F) << shift 5216 if b < 0x80 { 5217 break 5218 } 5219 } 5220 default: 5221 iNdEx = preIndex 5222 skippy, err := skipTxn(dAtA[iNdEx:]) 5223 if err != nil { 5224 return err 5225 } 5226 if (skippy < 0) || (iNdEx+skippy) < 0 { 5227 return ErrInvalidLengthTxn 5228 } 5229 if (iNdEx + skippy) > l { 5230 return io.ErrUnexpectedEOF 5231 } 5232 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5233 iNdEx += skippy 5234 } 5235 } 5236 5237 if iNdEx > l { 5238 return io.ErrUnexpectedEOF 5239 } 5240 return nil 5241 } 5242 func (m *TxnResponse) Unmarshal(dAtA []byte) error { 5243 l := len(dAtA) 5244 iNdEx := 0 5245 for iNdEx < l { 5246 preIndex := iNdEx 5247 var wire uint64 5248 for shift := uint(0); ; shift += 7 { 5249 if shift >= 64 { 5250 return ErrIntOverflowTxn 5251 } 5252 if iNdEx >= l { 5253 return io.ErrUnexpectedEOF 5254 } 5255 b := dAtA[iNdEx] 5256 iNdEx++ 5257 wire |= uint64(b&0x7F) << shift 5258 if b < 0x80 { 5259 break 5260 } 5261 } 5262 fieldNum := int32(wire >> 3) 5263 wireType := int(wire & 0x7) 5264 if wireType == 4 { 5265 return fmt.Errorf("proto: TxnResponse: wiretype end group for non-group") 5266 } 5267 if fieldNum <= 0 { 5268 return fmt.Errorf("proto: TxnResponse: illegal tag %d (wire type %d)", fieldNum, wire) 5269 } 5270 switch fieldNum { 5271 case 1: 5272 if wireType != 0 { 5273 return fmt.Errorf("proto: wrong wireType = %d for field RequestID", wireType) 5274 } 5275 m.RequestID = 0 5276 for shift := uint(0); ; shift += 7 { 5277 if shift >= 64 { 5278 return ErrIntOverflowTxn 5279 } 5280 if iNdEx >= l { 5281 return io.ErrUnexpectedEOF 5282 } 5283 b := dAtA[iNdEx] 5284 iNdEx++ 5285 m.RequestID |= uint64(b&0x7F) << shift 5286 if b < 0x80 { 5287 break 5288 } 5289 } 5290 case 2: 5291 if wireType != 2 { 5292 return fmt.Errorf("proto: wrong wireType = %d for field Txn", wireType) 5293 } 5294 var msglen int 5295 for shift := uint(0); ; shift += 7 { 5296 if shift >= 64 { 5297 return ErrIntOverflowTxn 5298 } 5299 if iNdEx >= l { 5300 return io.ErrUnexpectedEOF 5301 } 5302 b := dAtA[iNdEx] 5303 iNdEx++ 5304 msglen |= int(b&0x7F) << shift 5305 if b < 0x80 { 5306 break 5307 } 5308 } 5309 if msglen < 0 { 5310 return ErrInvalidLengthTxn 5311 } 5312 postIndex := iNdEx + msglen 5313 if postIndex < 0 { 5314 return ErrInvalidLengthTxn 5315 } 5316 if postIndex > l { 5317 return io.ErrUnexpectedEOF 5318 } 5319 if m.Txn == nil { 5320 m.Txn = &TxnMeta{} 5321 } 5322 if err := m.Txn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5323 return err 5324 } 5325 iNdEx = postIndex 5326 case 3: 5327 if wireType != 0 { 5328 return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) 5329 } 5330 m.Method = 0 5331 for shift := uint(0); ; shift += 7 { 5332 if shift >= 64 { 5333 return ErrIntOverflowTxn 5334 } 5335 if iNdEx >= l { 5336 return io.ErrUnexpectedEOF 5337 } 5338 b := dAtA[iNdEx] 5339 iNdEx++ 5340 m.Method |= TxnMethod(b&0x7F) << shift 5341 if b < 0x80 { 5342 break 5343 } 5344 } 5345 case 4: 5346 if wireType != 0 { 5347 return fmt.Errorf("proto: wrong wireType = %d for field Flag", wireType) 5348 } 5349 m.Flag = 0 5350 for shift := uint(0); ; shift += 7 { 5351 if shift >= 64 { 5352 return ErrIntOverflowTxn 5353 } 5354 if iNdEx >= l { 5355 return io.ErrUnexpectedEOF 5356 } 5357 b := dAtA[iNdEx] 5358 iNdEx++ 5359 m.Flag |= uint32(b&0x7F) << shift 5360 if b < 0x80 { 5361 break 5362 } 5363 } 5364 case 5: 5365 if wireType != 2 { 5366 return fmt.Errorf("proto: wrong wireType = %d for field TxnError", wireType) 5367 } 5368 var msglen int 5369 for shift := uint(0); ; shift += 7 { 5370 if shift >= 64 { 5371 return ErrIntOverflowTxn 5372 } 5373 if iNdEx >= l { 5374 return io.ErrUnexpectedEOF 5375 } 5376 b := dAtA[iNdEx] 5377 iNdEx++ 5378 msglen |= int(b&0x7F) << shift 5379 if b < 0x80 { 5380 break 5381 } 5382 } 5383 if msglen < 0 { 5384 return ErrInvalidLengthTxn 5385 } 5386 postIndex := iNdEx + msglen 5387 if postIndex < 0 { 5388 return ErrInvalidLengthTxn 5389 } 5390 if postIndex > l { 5391 return io.ErrUnexpectedEOF 5392 } 5393 if m.TxnError == nil { 5394 m.TxnError = &TxnError{} 5395 } 5396 if err := m.TxnError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5397 return err 5398 } 5399 iNdEx = postIndex 5400 case 6: 5401 if wireType != 2 { 5402 return fmt.Errorf("proto: wrong wireType = %d for field CNOpResponse", wireType) 5403 } 5404 var msglen int 5405 for shift := uint(0); ; shift += 7 { 5406 if shift >= 64 { 5407 return ErrIntOverflowTxn 5408 } 5409 if iNdEx >= l { 5410 return io.ErrUnexpectedEOF 5411 } 5412 b := dAtA[iNdEx] 5413 iNdEx++ 5414 msglen |= int(b&0x7F) << shift 5415 if b < 0x80 { 5416 break 5417 } 5418 } 5419 if msglen < 0 { 5420 return ErrInvalidLengthTxn 5421 } 5422 postIndex := iNdEx + msglen 5423 if postIndex < 0 { 5424 return ErrInvalidLengthTxn 5425 } 5426 if postIndex > l { 5427 return io.ErrUnexpectedEOF 5428 } 5429 if m.CNOpResponse == nil { 5430 m.CNOpResponse = &CNOpResponse{} 5431 } 5432 if err := m.CNOpResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5433 return err 5434 } 5435 iNdEx = postIndex 5436 case 7: 5437 if wireType != 2 { 5438 return fmt.Errorf("proto: wrong wireType = %d for field CommitResponse", wireType) 5439 } 5440 var msglen int 5441 for shift := uint(0); ; shift += 7 { 5442 if shift >= 64 { 5443 return ErrIntOverflowTxn 5444 } 5445 if iNdEx >= l { 5446 return io.ErrUnexpectedEOF 5447 } 5448 b := dAtA[iNdEx] 5449 iNdEx++ 5450 msglen |= int(b&0x7F) << shift 5451 if b < 0x80 { 5452 break 5453 } 5454 } 5455 if msglen < 0 { 5456 return ErrInvalidLengthTxn 5457 } 5458 postIndex := iNdEx + msglen 5459 if postIndex < 0 { 5460 return ErrInvalidLengthTxn 5461 } 5462 if postIndex > l { 5463 return io.ErrUnexpectedEOF 5464 } 5465 if m.CommitResponse == nil { 5466 m.CommitResponse = &TxnCommitResponse{} 5467 } 5468 if err := m.CommitResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5469 return err 5470 } 5471 iNdEx = postIndex 5472 case 8: 5473 if wireType != 2 { 5474 return fmt.Errorf("proto: wrong wireType = %d for field RollbackResponse", wireType) 5475 } 5476 var msglen int 5477 for shift := uint(0); ; shift += 7 { 5478 if shift >= 64 { 5479 return ErrIntOverflowTxn 5480 } 5481 if iNdEx >= l { 5482 return io.ErrUnexpectedEOF 5483 } 5484 b := dAtA[iNdEx] 5485 iNdEx++ 5486 msglen |= int(b&0x7F) << shift 5487 if b < 0x80 { 5488 break 5489 } 5490 } 5491 if msglen < 0 { 5492 return ErrInvalidLengthTxn 5493 } 5494 postIndex := iNdEx + msglen 5495 if postIndex < 0 { 5496 return ErrInvalidLengthTxn 5497 } 5498 if postIndex > l { 5499 return io.ErrUnexpectedEOF 5500 } 5501 if m.RollbackResponse == nil { 5502 m.RollbackResponse = &TxnRollbackResponse{} 5503 } 5504 if err := m.RollbackResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5505 return err 5506 } 5507 iNdEx = postIndex 5508 case 9: 5509 if wireType != 2 { 5510 return fmt.Errorf("proto: wrong wireType = %d for field PrepareResponse", wireType) 5511 } 5512 var msglen int 5513 for shift := uint(0); ; shift += 7 { 5514 if shift >= 64 { 5515 return ErrIntOverflowTxn 5516 } 5517 if iNdEx >= l { 5518 return io.ErrUnexpectedEOF 5519 } 5520 b := dAtA[iNdEx] 5521 iNdEx++ 5522 msglen |= int(b&0x7F) << shift 5523 if b < 0x80 { 5524 break 5525 } 5526 } 5527 if msglen < 0 { 5528 return ErrInvalidLengthTxn 5529 } 5530 postIndex := iNdEx + msglen 5531 if postIndex < 0 { 5532 return ErrInvalidLengthTxn 5533 } 5534 if postIndex > l { 5535 return io.ErrUnexpectedEOF 5536 } 5537 if m.PrepareResponse == nil { 5538 m.PrepareResponse = &TxnPrepareResponse{} 5539 } 5540 if err := m.PrepareResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5541 return err 5542 } 5543 iNdEx = postIndex 5544 case 10: 5545 if wireType != 2 { 5546 return fmt.Errorf("proto: wrong wireType = %d for field GetStatusResponse", wireType) 5547 } 5548 var msglen int 5549 for shift := uint(0); ; shift += 7 { 5550 if shift >= 64 { 5551 return ErrIntOverflowTxn 5552 } 5553 if iNdEx >= l { 5554 return io.ErrUnexpectedEOF 5555 } 5556 b := dAtA[iNdEx] 5557 iNdEx++ 5558 msglen |= int(b&0x7F) << shift 5559 if b < 0x80 { 5560 break 5561 } 5562 } 5563 if msglen < 0 { 5564 return ErrInvalidLengthTxn 5565 } 5566 postIndex := iNdEx + msglen 5567 if postIndex < 0 { 5568 return ErrInvalidLengthTxn 5569 } 5570 if postIndex > l { 5571 return io.ErrUnexpectedEOF 5572 } 5573 if m.GetStatusResponse == nil { 5574 m.GetStatusResponse = &TxnGetStatusResponse{} 5575 } 5576 if err := m.GetStatusResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5577 return err 5578 } 5579 iNdEx = postIndex 5580 case 11: 5581 if wireType != 2 { 5582 return fmt.Errorf("proto: wrong wireType = %d for field CommitTNShardResponse", wireType) 5583 } 5584 var msglen int 5585 for shift := uint(0); ; shift += 7 { 5586 if shift >= 64 { 5587 return ErrIntOverflowTxn 5588 } 5589 if iNdEx >= l { 5590 return io.ErrUnexpectedEOF 5591 } 5592 b := dAtA[iNdEx] 5593 iNdEx++ 5594 msglen |= int(b&0x7F) << shift 5595 if b < 0x80 { 5596 break 5597 } 5598 } 5599 if msglen < 0 { 5600 return ErrInvalidLengthTxn 5601 } 5602 postIndex := iNdEx + msglen 5603 if postIndex < 0 { 5604 return ErrInvalidLengthTxn 5605 } 5606 if postIndex > l { 5607 return io.ErrUnexpectedEOF 5608 } 5609 if m.CommitTNShardResponse == nil { 5610 m.CommitTNShardResponse = &TxnCommitTNShardResponse{} 5611 } 5612 if err := m.CommitTNShardResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5613 return err 5614 } 5615 iNdEx = postIndex 5616 case 12: 5617 if wireType != 2 { 5618 return fmt.Errorf("proto: wrong wireType = %d for field RollbackTNShardResponse", wireType) 5619 } 5620 var msglen int 5621 for shift := uint(0); ; shift += 7 { 5622 if shift >= 64 { 5623 return ErrIntOverflowTxn 5624 } 5625 if iNdEx >= l { 5626 return io.ErrUnexpectedEOF 5627 } 5628 b := dAtA[iNdEx] 5629 iNdEx++ 5630 msglen |= int(b&0x7F) << shift 5631 if b < 0x80 { 5632 break 5633 } 5634 } 5635 if msglen < 0 { 5636 return ErrInvalidLengthTxn 5637 } 5638 postIndex := iNdEx + msglen 5639 if postIndex < 0 { 5640 return ErrInvalidLengthTxn 5641 } 5642 if postIndex > l { 5643 return io.ErrUnexpectedEOF 5644 } 5645 if m.RollbackTNShardResponse == nil { 5646 m.RollbackTNShardResponse = &TxnRollbackTNShardResponse{} 5647 } 5648 if err := m.RollbackTNShardResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5649 return err 5650 } 5651 iNdEx = postIndex 5652 case 13: 5653 if wireType != 2 { 5654 return fmt.Errorf("proto: wrong wireType = %d for field RemoveMetadata", wireType) 5655 } 5656 var msglen int 5657 for shift := uint(0); ; shift += 7 { 5658 if shift >= 64 { 5659 return ErrIntOverflowTxn 5660 } 5661 if iNdEx >= l { 5662 return io.ErrUnexpectedEOF 5663 } 5664 b := dAtA[iNdEx] 5665 iNdEx++ 5666 msglen |= int(b&0x7F) << shift 5667 if b < 0x80 { 5668 break 5669 } 5670 } 5671 if msglen < 0 { 5672 return ErrInvalidLengthTxn 5673 } 5674 postIndex := iNdEx + msglen 5675 if postIndex < 0 { 5676 return ErrInvalidLengthTxn 5677 } 5678 if postIndex > l { 5679 return io.ErrUnexpectedEOF 5680 } 5681 if m.RemoveMetadata == nil { 5682 m.RemoveMetadata = &TxnRemoveMetadataResponse{} 5683 } 5684 if err := m.RemoveMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5685 return err 5686 } 5687 iNdEx = postIndex 5688 default: 5689 iNdEx = preIndex 5690 skippy, err := skipTxn(dAtA[iNdEx:]) 5691 if err != nil { 5692 return err 5693 } 5694 if (skippy < 0) || (iNdEx+skippy) < 0 { 5695 return ErrInvalidLengthTxn 5696 } 5697 if (iNdEx + skippy) > l { 5698 return io.ErrUnexpectedEOF 5699 } 5700 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5701 iNdEx += skippy 5702 } 5703 } 5704 5705 if iNdEx > l { 5706 return io.ErrUnexpectedEOF 5707 } 5708 return nil 5709 } 5710 func (m *TxnCommitRequest) Unmarshal(dAtA []byte) error { 5711 l := len(dAtA) 5712 iNdEx := 0 5713 for iNdEx < l { 5714 preIndex := iNdEx 5715 var wire uint64 5716 for shift := uint(0); ; shift += 7 { 5717 if shift >= 64 { 5718 return ErrIntOverflowTxn 5719 } 5720 if iNdEx >= l { 5721 return io.ErrUnexpectedEOF 5722 } 5723 b := dAtA[iNdEx] 5724 iNdEx++ 5725 wire |= uint64(b&0x7F) << shift 5726 if b < 0x80 { 5727 break 5728 } 5729 } 5730 fieldNum := int32(wire >> 3) 5731 wireType := int(wire & 0x7) 5732 if wireType == 4 { 5733 return fmt.Errorf("proto: TxnCommitRequest: wiretype end group for non-group") 5734 } 5735 if fieldNum <= 0 { 5736 return fmt.Errorf("proto: TxnCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) 5737 } 5738 switch fieldNum { 5739 case 1: 5740 if wireType != 2 { 5741 return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) 5742 } 5743 var msglen int 5744 for shift := uint(0); ; shift += 7 { 5745 if shift >= 64 { 5746 return ErrIntOverflowTxn 5747 } 5748 if iNdEx >= l { 5749 return io.ErrUnexpectedEOF 5750 } 5751 b := dAtA[iNdEx] 5752 iNdEx++ 5753 msglen |= int(b&0x7F) << shift 5754 if b < 0x80 { 5755 break 5756 } 5757 } 5758 if msglen < 0 { 5759 return ErrInvalidLengthTxn 5760 } 5761 postIndex := iNdEx + msglen 5762 if postIndex < 0 { 5763 return ErrInvalidLengthTxn 5764 } 5765 if postIndex > l { 5766 return io.ErrUnexpectedEOF 5767 } 5768 m.Payload = append(m.Payload, &TxnRequest{}) 5769 if err := m.Payload[len(m.Payload)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 5770 return err 5771 } 5772 iNdEx = postIndex 5773 case 2: 5774 if wireType != 0 { 5775 return fmt.Errorf("proto: wrong wireType = %d for field Disable1PCOpt", wireType) 5776 } 5777 var v int 5778 for shift := uint(0); ; shift += 7 { 5779 if shift >= 64 { 5780 return ErrIntOverflowTxn 5781 } 5782 if iNdEx >= l { 5783 return io.ErrUnexpectedEOF 5784 } 5785 b := dAtA[iNdEx] 5786 iNdEx++ 5787 v |= int(b&0x7F) << shift 5788 if b < 0x80 { 5789 break 5790 } 5791 } 5792 m.Disable1PCOpt = bool(v != 0) 5793 default: 5794 iNdEx = preIndex 5795 skippy, err := skipTxn(dAtA[iNdEx:]) 5796 if err != nil { 5797 return err 5798 } 5799 if (skippy < 0) || (iNdEx+skippy) < 0 { 5800 return ErrInvalidLengthTxn 5801 } 5802 if (iNdEx + skippy) > l { 5803 return io.ErrUnexpectedEOF 5804 } 5805 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5806 iNdEx += skippy 5807 } 5808 } 5809 5810 if iNdEx > l { 5811 return io.ErrUnexpectedEOF 5812 } 5813 return nil 5814 } 5815 func (m *TxnCommitResponse) Unmarshal(dAtA []byte) error { 5816 l := len(dAtA) 5817 iNdEx := 0 5818 for iNdEx < l { 5819 preIndex := iNdEx 5820 var wire uint64 5821 for shift := uint(0); ; shift += 7 { 5822 if shift >= 64 { 5823 return ErrIntOverflowTxn 5824 } 5825 if iNdEx >= l { 5826 return io.ErrUnexpectedEOF 5827 } 5828 b := dAtA[iNdEx] 5829 iNdEx++ 5830 wire |= uint64(b&0x7F) << shift 5831 if b < 0x80 { 5832 break 5833 } 5834 } 5835 fieldNum := int32(wire >> 3) 5836 wireType := int(wire & 0x7) 5837 if wireType == 4 { 5838 return fmt.Errorf("proto: TxnCommitResponse: wiretype end group for non-group") 5839 } 5840 if fieldNum <= 0 { 5841 return fmt.Errorf("proto: TxnCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) 5842 } 5843 switch fieldNum { 5844 case 1: 5845 if wireType == 0 { 5846 var v uint64 5847 for shift := uint(0); ; shift += 7 { 5848 if shift >= 64 { 5849 return ErrIntOverflowTxn 5850 } 5851 if iNdEx >= l { 5852 return io.ErrUnexpectedEOF 5853 } 5854 b := dAtA[iNdEx] 5855 iNdEx++ 5856 v |= uint64(b&0x7F) << shift 5857 if b < 0x80 { 5858 break 5859 } 5860 } 5861 m.InvalidLockTables = append(m.InvalidLockTables, v) 5862 } else if wireType == 2 { 5863 var packedLen int 5864 for shift := uint(0); ; shift += 7 { 5865 if shift >= 64 { 5866 return ErrIntOverflowTxn 5867 } 5868 if iNdEx >= l { 5869 return io.ErrUnexpectedEOF 5870 } 5871 b := dAtA[iNdEx] 5872 iNdEx++ 5873 packedLen |= int(b&0x7F) << shift 5874 if b < 0x80 { 5875 break 5876 } 5877 } 5878 if packedLen < 0 { 5879 return ErrInvalidLengthTxn 5880 } 5881 postIndex := iNdEx + packedLen 5882 if postIndex < 0 { 5883 return ErrInvalidLengthTxn 5884 } 5885 if postIndex > l { 5886 return io.ErrUnexpectedEOF 5887 } 5888 var elementCount int 5889 var count int 5890 for _, integer := range dAtA[iNdEx:postIndex] { 5891 if integer < 128 { 5892 count++ 5893 } 5894 } 5895 elementCount = count 5896 if elementCount != 0 && len(m.InvalidLockTables) == 0 { 5897 m.InvalidLockTables = make([]uint64, 0, elementCount) 5898 } 5899 for iNdEx < postIndex { 5900 var v uint64 5901 for shift := uint(0); ; shift += 7 { 5902 if shift >= 64 { 5903 return ErrIntOverflowTxn 5904 } 5905 if iNdEx >= l { 5906 return io.ErrUnexpectedEOF 5907 } 5908 b := dAtA[iNdEx] 5909 iNdEx++ 5910 v |= uint64(b&0x7F) << shift 5911 if b < 0x80 { 5912 break 5913 } 5914 } 5915 m.InvalidLockTables = append(m.InvalidLockTables, v) 5916 } 5917 } else { 5918 return fmt.Errorf("proto: wrong wireType = %d for field InvalidLockTables", wireType) 5919 } 5920 default: 5921 iNdEx = preIndex 5922 skippy, err := skipTxn(dAtA[iNdEx:]) 5923 if err != nil { 5924 return err 5925 } 5926 if (skippy < 0) || (iNdEx+skippy) < 0 { 5927 return ErrInvalidLengthTxn 5928 } 5929 if (iNdEx + skippy) > l { 5930 return io.ErrUnexpectedEOF 5931 } 5932 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5933 iNdEx += skippy 5934 } 5935 } 5936 5937 if iNdEx > l { 5938 return io.ErrUnexpectedEOF 5939 } 5940 return nil 5941 } 5942 func (m *TxnRollbackRequest) Unmarshal(dAtA []byte) error { 5943 l := len(dAtA) 5944 iNdEx := 0 5945 for iNdEx < l { 5946 preIndex := iNdEx 5947 var wire uint64 5948 for shift := uint(0); ; shift += 7 { 5949 if shift >= 64 { 5950 return ErrIntOverflowTxn 5951 } 5952 if iNdEx >= l { 5953 return io.ErrUnexpectedEOF 5954 } 5955 b := dAtA[iNdEx] 5956 iNdEx++ 5957 wire |= uint64(b&0x7F) << shift 5958 if b < 0x80 { 5959 break 5960 } 5961 } 5962 fieldNum := int32(wire >> 3) 5963 wireType := int(wire & 0x7) 5964 if wireType == 4 { 5965 return fmt.Errorf("proto: TxnRollbackRequest: wiretype end group for non-group") 5966 } 5967 if fieldNum <= 0 { 5968 return fmt.Errorf("proto: TxnRollbackRequest: illegal tag %d (wire type %d)", fieldNum, wire) 5969 } 5970 switch fieldNum { 5971 default: 5972 iNdEx = preIndex 5973 skippy, err := skipTxn(dAtA[iNdEx:]) 5974 if err != nil { 5975 return err 5976 } 5977 if (skippy < 0) || (iNdEx+skippy) < 0 { 5978 return ErrInvalidLengthTxn 5979 } 5980 if (iNdEx + skippy) > l { 5981 return io.ErrUnexpectedEOF 5982 } 5983 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 5984 iNdEx += skippy 5985 } 5986 } 5987 5988 if iNdEx > l { 5989 return io.ErrUnexpectedEOF 5990 } 5991 return nil 5992 } 5993 func (m *TxnRollbackResponse) Unmarshal(dAtA []byte) error { 5994 l := len(dAtA) 5995 iNdEx := 0 5996 for iNdEx < l { 5997 preIndex := iNdEx 5998 var wire uint64 5999 for shift := uint(0); ; shift += 7 { 6000 if shift >= 64 { 6001 return ErrIntOverflowTxn 6002 } 6003 if iNdEx >= l { 6004 return io.ErrUnexpectedEOF 6005 } 6006 b := dAtA[iNdEx] 6007 iNdEx++ 6008 wire |= uint64(b&0x7F) << shift 6009 if b < 0x80 { 6010 break 6011 } 6012 } 6013 fieldNum := int32(wire >> 3) 6014 wireType := int(wire & 0x7) 6015 if wireType == 4 { 6016 return fmt.Errorf("proto: TxnRollbackResponse: wiretype end group for non-group") 6017 } 6018 if fieldNum <= 0 { 6019 return fmt.Errorf("proto: TxnRollbackResponse: illegal tag %d (wire type %d)", fieldNum, wire) 6020 } 6021 switch fieldNum { 6022 default: 6023 iNdEx = preIndex 6024 skippy, err := skipTxn(dAtA[iNdEx:]) 6025 if err != nil { 6026 return err 6027 } 6028 if (skippy < 0) || (iNdEx+skippy) < 0 { 6029 return ErrInvalidLengthTxn 6030 } 6031 if (iNdEx + skippy) > l { 6032 return io.ErrUnexpectedEOF 6033 } 6034 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6035 iNdEx += skippy 6036 } 6037 } 6038 6039 if iNdEx > l { 6040 return io.ErrUnexpectedEOF 6041 } 6042 return nil 6043 } 6044 func (m *TxnPrepareRequest) Unmarshal(dAtA []byte) error { 6045 l := len(dAtA) 6046 iNdEx := 0 6047 for iNdEx < l { 6048 preIndex := iNdEx 6049 var wire uint64 6050 for shift := uint(0); ; shift += 7 { 6051 if shift >= 64 { 6052 return ErrIntOverflowTxn 6053 } 6054 if iNdEx >= l { 6055 return io.ErrUnexpectedEOF 6056 } 6057 b := dAtA[iNdEx] 6058 iNdEx++ 6059 wire |= uint64(b&0x7F) << shift 6060 if b < 0x80 { 6061 break 6062 } 6063 } 6064 fieldNum := int32(wire >> 3) 6065 wireType := int(wire & 0x7) 6066 if wireType == 4 { 6067 return fmt.Errorf("proto: TxnPrepareRequest: wiretype end group for non-group") 6068 } 6069 if fieldNum <= 0 { 6070 return fmt.Errorf("proto: TxnPrepareRequest: illegal tag %d (wire type %d)", fieldNum, wire) 6071 } 6072 switch fieldNum { 6073 case 1: 6074 if wireType != 2 { 6075 return fmt.Errorf("proto: wrong wireType = %d for field TNShard", wireType) 6076 } 6077 var msglen int 6078 for shift := uint(0); ; shift += 7 { 6079 if shift >= 64 { 6080 return ErrIntOverflowTxn 6081 } 6082 if iNdEx >= l { 6083 return io.ErrUnexpectedEOF 6084 } 6085 b := dAtA[iNdEx] 6086 iNdEx++ 6087 msglen |= int(b&0x7F) << shift 6088 if b < 0x80 { 6089 break 6090 } 6091 } 6092 if msglen < 0 { 6093 return ErrInvalidLengthTxn 6094 } 6095 postIndex := iNdEx + msglen 6096 if postIndex < 0 { 6097 return ErrInvalidLengthTxn 6098 } 6099 if postIndex > l { 6100 return io.ErrUnexpectedEOF 6101 } 6102 if err := m.TNShard.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6103 return err 6104 } 6105 iNdEx = postIndex 6106 default: 6107 iNdEx = preIndex 6108 skippy, err := skipTxn(dAtA[iNdEx:]) 6109 if err != nil { 6110 return err 6111 } 6112 if (skippy < 0) || (iNdEx+skippy) < 0 { 6113 return ErrInvalidLengthTxn 6114 } 6115 if (iNdEx + skippy) > l { 6116 return io.ErrUnexpectedEOF 6117 } 6118 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6119 iNdEx += skippy 6120 } 6121 } 6122 6123 if iNdEx > l { 6124 return io.ErrUnexpectedEOF 6125 } 6126 return nil 6127 } 6128 func (m *TxnPrepareResponse) Unmarshal(dAtA []byte) error { 6129 l := len(dAtA) 6130 iNdEx := 0 6131 for iNdEx < l { 6132 preIndex := iNdEx 6133 var wire uint64 6134 for shift := uint(0); ; shift += 7 { 6135 if shift >= 64 { 6136 return ErrIntOverflowTxn 6137 } 6138 if iNdEx >= l { 6139 return io.ErrUnexpectedEOF 6140 } 6141 b := dAtA[iNdEx] 6142 iNdEx++ 6143 wire |= uint64(b&0x7F) << shift 6144 if b < 0x80 { 6145 break 6146 } 6147 } 6148 fieldNum := int32(wire >> 3) 6149 wireType := int(wire & 0x7) 6150 if wireType == 4 { 6151 return fmt.Errorf("proto: TxnPrepareResponse: wiretype end group for non-group") 6152 } 6153 if fieldNum <= 0 { 6154 return fmt.Errorf("proto: TxnPrepareResponse: illegal tag %d (wire type %d)", fieldNum, wire) 6155 } 6156 switch fieldNum { 6157 default: 6158 iNdEx = preIndex 6159 skippy, err := skipTxn(dAtA[iNdEx:]) 6160 if err != nil { 6161 return err 6162 } 6163 if (skippy < 0) || (iNdEx+skippy) < 0 { 6164 return ErrInvalidLengthTxn 6165 } 6166 if (iNdEx + skippy) > l { 6167 return io.ErrUnexpectedEOF 6168 } 6169 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6170 iNdEx += skippy 6171 } 6172 } 6173 6174 if iNdEx > l { 6175 return io.ErrUnexpectedEOF 6176 } 6177 return nil 6178 } 6179 func (m *TxnGetStatusRequest) Unmarshal(dAtA []byte) error { 6180 l := len(dAtA) 6181 iNdEx := 0 6182 for iNdEx < l { 6183 preIndex := iNdEx 6184 var wire uint64 6185 for shift := uint(0); ; shift += 7 { 6186 if shift >= 64 { 6187 return ErrIntOverflowTxn 6188 } 6189 if iNdEx >= l { 6190 return io.ErrUnexpectedEOF 6191 } 6192 b := dAtA[iNdEx] 6193 iNdEx++ 6194 wire |= uint64(b&0x7F) << shift 6195 if b < 0x80 { 6196 break 6197 } 6198 } 6199 fieldNum := int32(wire >> 3) 6200 wireType := int(wire & 0x7) 6201 if wireType == 4 { 6202 return fmt.Errorf("proto: TxnGetStatusRequest: wiretype end group for non-group") 6203 } 6204 if fieldNum <= 0 { 6205 return fmt.Errorf("proto: TxnGetStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) 6206 } 6207 switch fieldNum { 6208 case 1: 6209 if wireType != 2 { 6210 return fmt.Errorf("proto: wrong wireType = %d for field TNShard", wireType) 6211 } 6212 var msglen int 6213 for shift := uint(0); ; shift += 7 { 6214 if shift >= 64 { 6215 return ErrIntOverflowTxn 6216 } 6217 if iNdEx >= l { 6218 return io.ErrUnexpectedEOF 6219 } 6220 b := dAtA[iNdEx] 6221 iNdEx++ 6222 msglen |= int(b&0x7F) << shift 6223 if b < 0x80 { 6224 break 6225 } 6226 } 6227 if msglen < 0 { 6228 return ErrInvalidLengthTxn 6229 } 6230 postIndex := iNdEx + msglen 6231 if postIndex < 0 { 6232 return ErrInvalidLengthTxn 6233 } 6234 if postIndex > l { 6235 return io.ErrUnexpectedEOF 6236 } 6237 if err := m.TNShard.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6238 return err 6239 } 6240 iNdEx = postIndex 6241 default: 6242 iNdEx = preIndex 6243 skippy, err := skipTxn(dAtA[iNdEx:]) 6244 if err != nil { 6245 return err 6246 } 6247 if (skippy < 0) || (iNdEx+skippy) < 0 { 6248 return ErrInvalidLengthTxn 6249 } 6250 if (iNdEx + skippy) > l { 6251 return io.ErrUnexpectedEOF 6252 } 6253 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6254 iNdEx += skippy 6255 } 6256 } 6257 6258 if iNdEx > l { 6259 return io.ErrUnexpectedEOF 6260 } 6261 return nil 6262 } 6263 func (m *TxnGetStatusResponse) Unmarshal(dAtA []byte) error { 6264 l := len(dAtA) 6265 iNdEx := 0 6266 for iNdEx < l { 6267 preIndex := iNdEx 6268 var wire uint64 6269 for shift := uint(0); ; shift += 7 { 6270 if shift >= 64 { 6271 return ErrIntOverflowTxn 6272 } 6273 if iNdEx >= l { 6274 return io.ErrUnexpectedEOF 6275 } 6276 b := dAtA[iNdEx] 6277 iNdEx++ 6278 wire |= uint64(b&0x7F) << shift 6279 if b < 0x80 { 6280 break 6281 } 6282 } 6283 fieldNum := int32(wire >> 3) 6284 wireType := int(wire & 0x7) 6285 if wireType == 4 { 6286 return fmt.Errorf("proto: TxnGetStatusResponse: wiretype end group for non-group") 6287 } 6288 if fieldNum <= 0 { 6289 return fmt.Errorf("proto: TxnGetStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) 6290 } 6291 switch fieldNum { 6292 default: 6293 iNdEx = preIndex 6294 skippy, err := skipTxn(dAtA[iNdEx:]) 6295 if err != nil { 6296 return err 6297 } 6298 if (skippy < 0) || (iNdEx+skippy) < 0 { 6299 return ErrInvalidLengthTxn 6300 } 6301 if (iNdEx + skippy) > l { 6302 return io.ErrUnexpectedEOF 6303 } 6304 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6305 iNdEx += skippy 6306 } 6307 } 6308 6309 if iNdEx > l { 6310 return io.ErrUnexpectedEOF 6311 } 6312 return nil 6313 } 6314 func (m *TxnCommitTNShardRequest) Unmarshal(dAtA []byte) error { 6315 l := len(dAtA) 6316 iNdEx := 0 6317 for iNdEx < l { 6318 preIndex := iNdEx 6319 var wire uint64 6320 for shift := uint(0); ; shift += 7 { 6321 if shift >= 64 { 6322 return ErrIntOverflowTxn 6323 } 6324 if iNdEx >= l { 6325 return io.ErrUnexpectedEOF 6326 } 6327 b := dAtA[iNdEx] 6328 iNdEx++ 6329 wire |= uint64(b&0x7F) << shift 6330 if b < 0x80 { 6331 break 6332 } 6333 } 6334 fieldNum := int32(wire >> 3) 6335 wireType := int(wire & 0x7) 6336 if wireType == 4 { 6337 return fmt.Errorf("proto: TxnCommitTNShardRequest: wiretype end group for non-group") 6338 } 6339 if fieldNum <= 0 { 6340 return fmt.Errorf("proto: TxnCommitTNShardRequest: illegal tag %d (wire type %d)", fieldNum, wire) 6341 } 6342 switch fieldNum { 6343 case 1: 6344 if wireType != 2 { 6345 return fmt.Errorf("proto: wrong wireType = %d for field TNShard", wireType) 6346 } 6347 var msglen int 6348 for shift := uint(0); ; shift += 7 { 6349 if shift >= 64 { 6350 return ErrIntOverflowTxn 6351 } 6352 if iNdEx >= l { 6353 return io.ErrUnexpectedEOF 6354 } 6355 b := dAtA[iNdEx] 6356 iNdEx++ 6357 msglen |= int(b&0x7F) << shift 6358 if b < 0x80 { 6359 break 6360 } 6361 } 6362 if msglen < 0 { 6363 return ErrInvalidLengthTxn 6364 } 6365 postIndex := iNdEx + msglen 6366 if postIndex < 0 { 6367 return ErrInvalidLengthTxn 6368 } 6369 if postIndex > l { 6370 return io.ErrUnexpectedEOF 6371 } 6372 if err := m.TNShard.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6373 return err 6374 } 6375 iNdEx = postIndex 6376 default: 6377 iNdEx = preIndex 6378 skippy, err := skipTxn(dAtA[iNdEx:]) 6379 if err != nil { 6380 return err 6381 } 6382 if (skippy < 0) || (iNdEx+skippy) < 0 { 6383 return ErrInvalidLengthTxn 6384 } 6385 if (iNdEx + skippy) > l { 6386 return io.ErrUnexpectedEOF 6387 } 6388 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6389 iNdEx += skippy 6390 } 6391 } 6392 6393 if iNdEx > l { 6394 return io.ErrUnexpectedEOF 6395 } 6396 return nil 6397 } 6398 func (m *TxnCommitTNShardResponse) Unmarshal(dAtA []byte) error { 6399 l := len(dAtA) 6400 iNdEx := 0 6401 for iNdEx < l { 6402 preIndex := iNdEx 6403 var wire uint64 6404 for shift := uint(0); ; shift += 7 { 6405 if shift >= 64 { 6406 return ErrIntOverflowTxn 6407 } 6408 if iNdEx >= l { 6409 return io.ErrUnexpectedEOF 6410 } 6411 b := dAtA[iNdEx] 6412 iNdEx++ 6413 wire |= uint64(b&0x7F) << shift 6414 if b < 0x80 { 6415 break 6416 } 6417 } 6418 fieldNum := int32(wire >> 3) 6419 wireType := int(wire & 0x7) 6420 if wireType == 4 { 6421 return fmt.Errorf("proto: TxnCommitTNShardResponse: wiretype end group for non-group") 6422 } 6423 if fieldNum <= 0 { 6424 return fmt.Errorf("proto: TxnCommitTNShardResponse: illegal tag %d (wire type %d)", fieldNum, wire) 6425 } 6426 switch fieldNum { 6427 default: 6428 iNdEx = preIndex 6429 skippy, err := skipTxn(dAtA[iNdEx:]) 6430 if err != nil { 6431 return err 6432 } 6433 if (skippy < 0) || (iNdEx+skippy) < 0 { 6434 return ErrInvalidLengthTxn 6435 } 6436 if (iNdEx + skippy) > l { 6437 return io.ErrUnexpectedEOF 6438 } 6439 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6440 iNdEx += skippy 6441 } 6442 } 6443 6444 if iNdEx > l { 6445 return io.ErrUnexpectedEOF 6446 } 6447 return nil 6448 } 6449 func (m *TxnRollbackTNShardRequest) Unmarshal(dAtA []byte) error { 6450 l := len(dAtA) 6451 iNdEx := 0 6452 for iNdEx < l { 6453 preIndex := iNdEx 6454 var wire uint64 6455 for shift := uint(0); ; shift += 7 { 6456 if shift >= 64 { 6457 return ErrIntOverflowTxn 6458 } 6459 if iNdEx >= l { 6460 return io.ErrUnexpectedEOF 6461 } 6462 b := dAtA[iNdEx] 6463 iNdEx++ 6464 wire |= uint64(b&0x7F) << shift 6465 if b < 0x80 { 6466 break 6467 } 6468 } 6469 fieldNum := int32(wire >> 3) 6470 wireType := int(wire & 0x7) 6471 if wireType == 4 { 6472 return fmt.Errorf("proto: TxnRollbackTNShardRequest: wiretype end group for non-group") 6473 } 6474 if fieldNum <= 0 { 6475 return fmt.Errorf("proto: TxnRollbackTNShardRequest: illegal tag %d (wire type %d)", fieldNum, wire) 6476 } 6477 switch fieldNum { 6478 case 1: 6479 if wireType != 2 { 6480 return fmt.Errorf("proto: wrong wireType = %d for field TNShard", wireType) 6481 } 6482 var msglen int 6483 for shift := uint(0); ; shift += 7 { 6484 if shift >= 64 { 6485 return ErrIntOverflowTxn 6486 } 6487 if iNdEx >= l { 6488 return io.ErrUnexpectedEOF 6489 } 6490 b := dAtA[iNdEx] 6491 iNdEx++ 6492 msglen |= int(b&0x7F) << shift 6493 if b < 0x80 { 6494 break 6495 } 6496 } 6497 if msglen < 0 { 6498 return ErrInvalidLengthTxn 6499 } 6500 postIndex := iNdEx + msglen 6501 if postIndex < 0 { 6502 return ErrInvalidLengthTxn 6503 } 6504 if postIndex > l { 6505 return io.ErrUnexpectedEOF 6506 } 6507 if err := m.TNShard.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6508 return err 6509 } 6510 iNdEx = postIndex 6511 default: 6512 iNdEx = preIndex 6513 skippy, err := skipTxn(dAtA[iNdEx:]) 6514 if err != nil { 6515 return err 6516 } 6517 if (skippy < 0) || (iNdEx+skippy) < 0 { 6518 return ErrInvalidLengthTxn 6519 } 6520 if (iNdEx + skippy) > l { 6521 return io.ErrUnexpectedEOF 6522 } 6523 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6524 iNdEx += skippy 6525 } 6526 } 6527 6528 if iNdEx > l { 6529 return io.ErrUnexpectedEOF 6530 } 6531 return nil 6532 } 6533 func (m *TxnRollbackTNShardResponse) Unmarshal(dAtA []byte) error { 6534 l := len(dAtA) 6535 iNdEx := 0 6536 for iNdEx < l { 6537 preIndex := iNdEx 6538 var wire uint64 6539 for shift := uint(0); ; shift += 7 { 6540 if shift >= 64 { 6541 return ErrIntOverflowTxn 6542 } 6543 if iNdEx >= l { 6544 return io.ErrUnexpectedEOF 6545 } 6546 b := dAtA[iNdEx] 6547 iNdEx++ 6548 wire |= uint64(b&0x7F) << shift 6549 if b < 0x80 { 6550 break 6551 } 6552 } 6553 fieldNum := int32(wire >> 3) 6554 wireType := int(wire & 0x7) 6555 if wireType == 4 { 6556 return fmt.Errorf("proto: TxnRollbackTNShardResponse: wiretype end group for non-group") 6557 } 6558 if fieldNum <= 0 { 6559 return fmt.Errorf("proto: TxnRollbackTNShardResponse: illegal tag %d (wire type %d)", fieldNum, wire) 6560 } 6561 switch fieldNum { 6562 default: 6563 iNdEx = preIndex 6564 skippy, err := skipTxn(dAtA[iNdEx:]) 6565 if err != nil { 6566 return err 6567 } 6568 if (skippy < 0) || (iNdEx+skippy) < 0 { 6569 return ErrInvalidLengthTxn 6570 } 6571 if (iNdEx + skippy) > l { 6572 return io.ErrUnexpectedEOF 6573 } 6574 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6575 iNdEx += skippy 6576 } 6577 } 6578 6579 if iNdEx > l { 6580 return io.ErrUnexpectedEOF 6581 } 6582 return nil 6583 } 6584 func (m *TxnRemoveMetadataRequest) Unmarshal(dAtA []byte) error { 6585 l := len(dAtA) 6586 iNdEx := 0 6587 for iNdEx < l { 6588 preIndex := iNdEx 6589 var wire uint64 6590 for shift := uint(0); ; shift += 7 { 6591 if shift >= 64 { 6592 return ErrIntOverflowTxn 6593 } 6594 if iNdEx >= l { 6595 return io.ErrUnexpectedEOF 6596 } 6597 b := dAtA[iNdEx] 6598 iNdEx++ 6599 wire |= uint64(b&0x7F) << shift 6600 if b < 0x80 { 6601 break 6602 } 6603 } 6604 fieldNum := int32(wire >> 3) 6605 wireType := int(wire & 0x7) 6606 if wireType == 4 { 6607 return fmt.Errorf("proto: TxnRemoveMetadataRequest: wiretype end group for non-group") 6608 } 6609 if fieldNum <= 0 { 6610 return fmt.Errorf("proto: TxnRemoveMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) 6611 } 6612 switch fieldNum { 6613 case 1: 6614 if wireType != 2 { 6615 return fmt.Errorf("proto: wrong wireType = %d for field TNShard", wireType) 6616 } 6617 var msglen int 6618 for shift := uint(0); ; shift += 7 { 6619 if shift >= 64 { 6620 return ErrIntOverflowTxn 6621 } 6622 if iNdEx >= l { 6623 return io.ErrUnexpectedEOF 6624 } 6625 b := dAtA[iNdEx] 6626 iNdEx++ 6627 msglen |= int(b&0x7F) << shift 6628 if b < 0x80 { 6629 break 6630 } 6631 } 6632 if msglen < 0 { 6633 return ErrInvalidLengthTxn 6634 } 6635 postIndex := iNdEx + msglen 6636 if postIndex < 0 { 6637 return ErrInvalidLengthTxn 6638 } 6639 if postIndex > l { 6640 return io.ErrUnexpectedEOF 6641 } 6642 if err := m.TNShard.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 6643 return err 6644 } 6645 iNdEx = postIndex 6646 default: 6647 iNdEx = preIndex 6648 skippy, err := skipTxn(dAtA[iNdEx:]) 6649 if err != nil { 6650 return err 6651 } 6652 if (skippy < 0) || (iNdEx+skippy) < 0 { 6653 return ErrInvalidLengthTxn 6654 } 6655 if (iNdEx + skippy) > l { 6656 return io.ErrUnexpectedEOF 6657 } 6658 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6659 iNdEx += skippy 6660 } 6661 } 6662 6663 if iNdEx > l { 6664 return io.ErrUnexpectedEOF 6665 } 6666 return nil 6667 } 6668 func (m *TxnRemoveMetadataResponse) Unmarshal(dAtA []byte) error { 6669 l := len(dAtA) 6670 iNdEx := 0 6671 for iNdEx < l { 6672 preIndex := iNdEx 6673 var wire uint64 6674 for shift := uint(0); ; shift += 7 { 6675 if shift >= 64 { 6676 return ErrIntOverflowTxn 6677 } 6678 if iNdEx >= l { 6679 return io.ErrUnexpectedEOF 6680 } 6681 b := dAtA[iNdEx] 6682 iNdEx++ 6683 wire |= uint64(b&0x7F) << shift 6684 if b < 0x80 { 6685 break 6686 } 6687 } 6688 fieldNum := int32(wire >> 3) 6689 wireType := int(wire & 0x7) 6690 if wireType == 4 { 6691 return fmt.Errorf("proto: TxnRemoveMetadataResponse: wiretype end group for non-group") 6692 } 6693 if fieldNum <= 0 { 6694 return fmt.Errorf("proto: TxnRemoveMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) 6695 } 6696 switch fieldNum { 6697 default: 6698 iNdEx = preIndex 6699 skippy, err := skipTxn(dAtA[iNdEx:]) 6700 if err != nil { 6701 return err 6702 } 6703 if (skippy < 0) || (iNdEx+skippy) < 0 { 6704 return ErrInvalidLengthTxn 6705 } 6706 if (iNdEx + skippy) > l { 6707 return io.ErrUnexpectedEOF 6708 } 6709 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6710 iNdEx += skippy 6711 } 6712 } 6713 6714 if iNdEx > l { 6715 return io.ErrUnexpectedEOF 6716 } 6717 return nil 6718 } 6719 func (m *TxnError) Unmarshal(dAtA []byte) error { 6720 l := len(dAtA) 6721 iNdEx := 0 6722 for iNdEx < l { 6723 preIndex := iNdEx 6724 var wire uint64 6725 for shift := uint(0); ; shift += 7 { 6726 if shift >= 64 { 6727 return ErrIntOverflowTxn 6728 } 6729 if iNdEx >= l { 6730 return io.ErrUnexpectedEOF 6731 } 6732 b := dAtA[iNdEx] 6733 iNdEx++ 6734 wire |= uint64(b&0x7F) << shift 6735 if b < 0x80 { 6736 break 6737 } 6738 } 6739 fieldNum := int32(wire >> 3) 6740 wireType := int(wire & 0x7) 6741 if wireType == 4 { 6742 return fmt.Errorf("proto: TxnError: wiretype end group for non-group") 6743 } 6744 if fieldNum <= 0 { 6745 return fmt.Errorf("proto: TxnError: illegal tag %d (wire type %d)", fieldNum, wire) 6746 } 6747 switch fieldNum { 6748 case 1: 6749 if wireType != 0 { 6750 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 6751 } 6752 m.Code = 0 6753 for shift := uint(0); ; shift += 7 { 6754 if shift >= 64 { 6755 return ErrIntOverflowTxn 6756 } 6757 if iNdEx >= l { 6758 return io.ErrUnexpectedEOF 6759 } 6760 b := dAtA[iNdEx] 6761 iNdEx++ 6762 m.Code |= uint32(b&0x7F) << shift 6763 if b < 0x80 { 6764 break 6765 } 6766 } 6767 case 2: 6768 if wireType != 2 { 6769 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 6770 } 6771 var byteLen int 6772 for shift := uint(0); ; shift += 7 { 6773 if shift >= 64 { 6774 return ErrIntOverflowTxn 6775 } 6776 if iNdEx >= l { 6777 return io.ErrUnexpectedEOF 6778 } 6779 b := dAtA[iNdEx] 6780 iNdEx++ 6781 byteLen |= int(b&0x7F) << shift 6782 if b < 0x80 { 6783 break 6784 } 6785 } 6786 if byteLen < 0 { 6787 return ErrInvalidLengthTxn 6788 } 6789 postIndex := iNdEx + byteLen 6790 if postIndex < 0 { 6791 return ErrInvalidLengthTxn 6792 } 6793 if postIndex > l { 6794 return io.ErrUnexpectedEOF 6795 } 6796 m.Error = append(m.Error[:0], dAtA[iNdEx:postIndex]...) 6797 if m.Error == nil { 6798 m.Error = []byte{} 6799 } 6800 iNdEx = postIndex 6801 case 3: 6802 if wireType != 0 { 6803 return fmt.Errorf("proto: wrong wireType = %d for field TxnErrCode", wireType) 6804 } 6805 m.TxnErrCode = 0 6806 for shift := uint(0); ; shift += 7 { 6807 if shift >= 64 { 6808 return ErrIntOverflowTxn 6809 } 6810 if iNdEx >= l { 6811 return io.ErrUnexpectedEOF 6812 } 6813 b := dAtA[iNdEx] 6814 iNdEx++ 6815 m.TxnErrCode |= uint32(b&0x7F) << shift 6816 if b < 0x80 { 6817 break 6818 } 6819 } 6820 default: 6821 iNdEx = preIndex 6822 skippy, err := skipTxn(dAtA[iNdEx:]) 6823 if err != nil { 6824 return err 6825 } 6826 if (skippy < 0) || (iNdEx+skippy) < 0 { 6827 return ErrInvalidLengthTxn 6828 } 6829 if (iNdEx + skippy) > l { 6830 return io.ErrUnexpectedEOF 6831 } 6832 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 6833 iNdEx += skippy 6834 } 6835 } 6836 6837 if iNdEx > l { 6838 return io.ErrUnexpectedEOF 6839 } 6840 return nil 6841 } 6842 func (m *TxnOptions) Unmarshal(dAtA []byte) error { 6843 l := len(dAtA) 6844 iNdEx := 0 6845 for iNdEx < l { 6846 preIndex := iNdEx 6847 var wire uint64 6848 for shift := uint(0); ; shift += 7 { 6849 if shift >= 64 { 6850 return ErrIntOverflowTxn 6851 } 6852 if iNdEx >= l { 6853 return io.ErrUnexpectedEOF 6854 } 6855 b := dAtA[iNdEx] 6856 iNdEx++ 6857 wire |= uint64(b&0x7F) << shift 6858 if b < 0x80 { 6859 break 6860 } 6861 } 6862 fieldNum := int32(wire >> 3) 6863 wireType := int(wire & 0x7) 6864 if wireType == 4 { 6865 return fmt.Errorf("proto: TxnOptions: wiretype end group for non-group") 6866 } 6867 if fieldNum <= 0 { 6868 return fmt.Errorf("proto: TxnOptions: illegal tag %d (wire type %d)", fieldNum, wire) 6869 } 6870 switch fieldNum { 6871 case 1: 6872 if wireType != 0 { 6873 return fmt.Errorf("proto: wrong wireType = %d for field Features", wireType) 6874 } 6875 m.Features = 0 6876 for shift := uint(0); ; shift += 7 { 6877 if shift >= 64 { 6878 return ErrIntOverflowTxn 6879 } 6880 if iNdEx >= l { 6881 return io.ErrUnexpectedEOF 6882 } 6883 b := dAtA[iNdEx] 6884 iNdEx++ 6885 m.Features |= uint32(b&0x7F) << shift 6886 if b < 0x80 { 6887 break 6888 } 6889 } 6890 case 2: 6891 if wireType != 2 { 6892 return fmt.Errorf("proto: wrong wireType = %d for field CN", wireType) 6893 } 6894 var stringLen uint64 6895 for shift := uint(0); ; shift += 7 { 6896 if shift >= 64 { 6897 return ErrIntOverflowTxn 6898 } 6899 if iNdEx >= l { 6900 return io.ErrUnexpectedEOF 6901 } 6902 b := dAtA[iNdEx] 6903 iNdEx++ 6904 stringLen |= uint64(b&0x7F) << shift 6905 if b < 0x80 { 6906 break 6907 } 6908 } 6909 intStringLen := int(stringLen) 6910 if intStringLen < 0 { 6911 return ErrInvalidLengthTxn 6912 } 6913 postIndex := iNdEx + intStringLen 6914 if postIndex < 0 { 6915 return ErrInvalidLengthTxn 6916 } 6917 if postIndex > l { 6918 return io.ErrUnexpectedEOF 6919 } 6920 m.CN = string(dAtA[iNdEx:postIndex]) 6921 iNdEx = postIndex 6922 case 3: 6923 if wireType != 2 { 6924 return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) 6925 } 6926 var stringLen uint64 6927 for shift := uint(0); ; shift += 7 { 6928 if shift >= 64 { 6929 return ErrIntOverflowTxn 6930 } 6931 if iNdEx >= l { 6932 return io.ErrUnexpectedEOF 6933 } 6934 b := dAtA[iNdEx] 6935 iNdEx++ 6936 stringLen |= uint64(b&0x7F) << shift 6937 if b < 0x80 { 6938 break 6939 } 6940 } 6941 intStringLen := int(stringLen) 6942 if intStringLen < 0 { 6943 return ErrInvalidLengthTxn 6944 } 6945 postIndex := iNdEx + intStringLen 6946 if postIndex < 0 { 6947 return ErrInvalidLengthTxn 6948 } 6949 if postIndex > l { 6950 return io.ErrUnexpectedEOF 6951 } 6952 m.SessionID = string(dAtA[iNdEx:postIndex]) 6953 iNdEx = postIndex 6954 case 4: 6955 if wireType != 0 { 6956 return fmt.Errorf("proto: wrong wireType = %d for field AccountID", wireType) 6957 } 6958 m.AccountID = 0 6959 for shift := uint(0); ; shift += 7 { 6960 if shift >= 64 { 6961 return ErrIntOverflowTxn 6962 } 6963 if iNdEx >= l { 6964 return io.ErrUnexpectedEOF 6965 } 6966 b := dAtA[iNdEx] 6967 iNdEx++ 6968 m.AccountID |= uint32(b&0x7F) << shift 6969 if b < 0x80 { 6970 break 6971 } 6972 } 6973 case 5: 6974 if wireType != 0 { 6975 return fmt.Errorf("proto: wrong wireType = %d for field ConnectionID", wireType) 6976 } 6977 m.ConnectionID = 0 6978 for shift := uint(0); ; shift += 7 { 6979 if shift >= 64 { 6980 return ErrIntOverflowTxn 6981 } 6982 if iNdEx >= l { 6983 return io.ErrUnexpectedEOF 6984 } 6985 b := dAtA[iNdEx] 6986 iNdEx++ 6987 m.ConnectionID |= uint32(b&0x7F) << shift 6988 if b < 0x80 { 6989 break 6990 } 6991 } 6992 case 6: 6993 if wireType != 2 { 6994 return fmt.Errorf("proto: wrong wireType = %d for field UserName", wireType) 6995 } 6996 var stringLen uint64 6997 for shift := uint(0); ; shift += 7 { 6998 if shift >= 64 { 6999 return ErrIntOverflowTxn 7000 } 7001 if iNdEx >= l { 7002 return io.ErrUnexpectedEOF 7003 } 7004 b := dAtA[iNdEx] 7005 iNdEx++ 7006 stringLen |= uint64(b&0x7F) << shift 7007 if b < 0x80 { 7008 break 7009 } 7010 } 7011 intStringLen := int(stringLen) 7012 if intStringLen < 0 { 7013 return ErrInvalidLengthTxn 7014 } 7015 postIndex := iNdEx + intStringLen 7016 if postIndex < 0 { 7017 return ErrInvalidLengthTxn 7018 } 7019 if postIndex > l { 7020 return io.ErrUnexpectedEOF 7021 } 7022 m.UserName = string(dAtA[iNdEx:postIndex]) 7023 iNdEx = postIndex 7024 case 7: 7025 if wireType == 0 { 7026 var v uint64 7027 for shift := uint(0); ; shift += 7 { 7028 if shift >= 64 { 7029 return ErrIntOverflowTxn 7030 } 7031 if iNdEx >= l { 7032 return io.ErrUnexpectedEOF 7033 } 7034 b := dAtA[iNdEx] 7035 iNdEx++ 7036 v |= uint64(b&0x7F) << shift 7037 if b < 0x80 { 7038 break 7039 } 7040 } 7041 m.SkipLockTables = append(m.SkipLockTables, v) 7042 } else if wireType == 2 { 7043 var packedLen int 7044 for shift := uint(0); ; shift += 7 { 7045 if shift >= 64 { 7046 return ErrIntOverflowTxn 7047 } 7048 if iNdEx >= l { 7049 return io.ErrUnexpectedEOF 7050 } 7051 b := dAtA[iNdEx] 7052 iNdEx++ 7053 packedLen |= int(b&0x7F) << shift 7054 if b < 0x80 { 7055 break 7056 } 7057 } 7058 if packedLen < 0 { 7059 return ErrInvalidLengthTxn 7060 } 7061 postIndex := iNdEx + packedLen 7062 if postIndex < 0 { 7063 return ErrInvalidLengthTxn 7064 } 7065 if postIndex > l { 7066 return io.ErrUnexpectedEOF 7067 } 7068 var elementCount int 7069 var count int 7070 for _, integer := range dAtA[iNdEx:postIndex] { 7071 if integer < 128 { 7072 count++ 7073 } 7074 } 7075 elementCount = count 7076 if elementCount != 0 && len(m.SkipLockTables) == 0 { 7077 m.SkipLockTables = make([]uint64, 0, elementCount) 7078 } 7079 for iNdEx < postIndex { 7080 var v uint64 7081 for shift := uint(0); ; shift += 7 { 7082 if shift >= 64 { 7083 return ErrIntOverflowTxn 7084 } 7085 if iNdEx >= l { 7086 return io.ErrUnexpectedEOF 7087 } 7088 b := dAtA[iNdEx] 7089 iNdEx++ 7090 v |= uint64(b&0x7F) << shift 7091 if b < 0x80 { 7092 break 7093 } 7094 } 7095 m.SkipLockTables = append(m.SkipLockTables, v) 7096 } 7097 } else { 7098 return fmt.Errorf("proto: wrong wireType = %d for field SkipLockTables", wireType) 7099 } 7100 case 8: 7101 if wireType == 0 { 7102 var v lock.LockMode 7103 for shift := uint(0); ; shift += 7 { 7104 if shift >= 64 { 7105 return ErrIntOverflowTxn 7106 } 7107 if iNdEx >= l { 7108 return io.ErrUnexpectedEOF 7109 } 7110 b := dAtA[iNdEx] 7111 iNdEx++ 7112 v |= lock.LockMode(b&0x7F) << shift 7113 if b < 0x80 { 7114 break 7115 } 7116 } 7117 m.SkipLockTableModes = append(m.SkipLockTableModes, v) 7118 } else if wireType == 2 { 7119 var packedLen int 7120 for shift := uint(0); ; shift += 7 { 7121 if shift >= 64 { 7122 return ErrIntOverflowTxn 7123 } 7124 if iNdEx >= l { 7125 return io.ErrUnexpectedEOF 7126 } 7127 b := dAtA[iNdEx] 7128 iNdEx++ 7129 packedLen |= int(b&0x7F) << shift 7130 if b < 0x80 { 7131 break 7132 } 7133 } 7134 if packedLen < 0 { 7135 return ErrInvalidLengthTxn 7136 } 7137 postIndex := iNdEx + packedLen 7138 if postIndex < 0 { 7139 return ErrInvalidLengthTxn 7140 } 7141 if postIndex > l { 7142 return io.ErrUnexpectedEOF 7143 } 7144 var elementCount int 7145 if elementCount != 0 && len(m.SkipLockTableModes) == 0 { 7146 m.SkipLockTableModes = make([]lock.LockMode, 0, elementCount) 7147 } 7148 for iNdEx < postIndex { 7149 var v lock.LockMode 7150 for shift := uint(0); ; shift += 7 { 7151 if shift >= 64 { 7152 return ErrIntOverflowTxn 7153 } 7154 if iNdEx >= l { 7155 return io.ErrUnexpectedEOF 7156 } 7157 b := dAtA[iNdEx] 7158 iNdEx++ 7159 v |= lock.LockMode(b&0x7F) << shift 7160 if b < 0x80 { 7161 break 7162 } 7163 } 7164 m.SkipLockTableModes = append(m.SkipLockTableModes, v) 7165 } 7166 } else { 7167 return fmt.Errorf("proto: wrong wireType = %d for field SkipLockTableModes", wireType) 7168 } 7169 case 9: 7170 if wireType != 2 { 7171 return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) 7172 } 7173 var stringLen uint64 7174 for shift := uint(0); ; shift += 7 { 7175 if shift >= 64 { 7176 return ErrIntOverflowTxn 7177 } 7178 if iNdEx >= l { 7179 return io.ErrUnexpectedEOF 7180 } 7181 b := dAtA[iNdEx] 7182 iNdEx++ 7183 stringLen |= uint64(b&0x7F) << shift 7184 if b < 0x80 { 7185 break 7186 } 7187 } 7188 intStringLen := int(stringLen) 7189 if intStringLen < 0 { 7190 return ErrInvalidLengthTxn 7191 } 7192 postIndex := iNdEx + intStringLen 7193 if postIndex < 0 { 7194 return ErrInvalidLengthTxn 7195 } 7196 if postIndex > l { 7197 return io.ErrUnexpectedEOF 7198 } 7199 m.Counter = string(dAtA[iNdEx:postIndex]) 7200 iNdEx = postIndex 7201 case 10: 7202 if wireType != 2 { 7203 return fmt.Errorf("proto: wrong wireType = %d for field SessionInfo", wireType) 7204 } 7205 var stringLen uint64 7206 for shift := uint(0); ; shift += 7 { 7207 if shift >= 64 { 7208 return ErrIntOverflowTxn 7209 } 7210 if iNdEx >= l { 7211 return io.ErrUnexpectedEOF 7212 } 7213 b := dAtA[iNdEx] 7214 iNdEx++ 7215 stringLen |= uint64(b&0x7F) << shift 7216 if b < 0x80 { 7217 break 7218 } 7219 } 7220 intStringLen := int(stringLen) 7221 if intStringLen < 0 { 7222 return ErrInvalidLengthTxn 7223 } 7224 postIndex := iNdEx + intStringLen 7225 if postIndex < 0 { 7226 return ErrInvalidLengthTxn 7227 } 7228 if postIndex > l { 7229 return io.ErrUnexpectedEOF 7230 } 7231 m.SessionInfo = string(dAtA[iNdEx:postIndex]) 7232 iNdEx = postIndex 7233 case 11: 7234 if wireType != 0 { 7235 return fmt.Errorf("proto: wrong wireType = %d for field InRunSql", wireType) 7236 } 7237 var v int 7238 for shift := uint(0); ; shift += 7 { 7239 if shift >= 64 { 7240 return ErrIntOverflowTxn 7241 } 7242 if iNdEx >= l { 7243 return io.ErrUnexpectedEOF 7244 } 7245 b := dAtA[iNdEx] 7246 iNdEx++ 7247 v |= int(b&0x7F) << shift 7248 if b < 0x80 { 7249 break 7250 } 7251 } 7252 m.InRunSql = bool(v != 0) 7253 case 12: 7254 if wireType != 0 { 7255 return fmt.Errorf("proto: wrong wireType = %d for field InCommit", wireType) 7256 } 7257 var v int 7258 for shift := uint(0); ; shift += 7 { 7259 if shift >= 64 { 7260 return ErrIntOverflowTxn 7261 } 7262 if iNdEx >= l { 7263 return io.ErrUnexpectedEOF 7264 } 7265 b := dAtA[iNdEx] 7266 iNdEx++ 7267 v |= int(b&0x7F) << shift 7268 if b < 0x80 { 7269 break 7270 } 7271 } 7272 m.InCommit = bool(v != 0) 7273 case 13: 7274 if wireType != 0 { 7275 return fmt.Errorf("proto: wrong wireType = %d for field InRollback", wireType) 7276 } 7277 var v int 7278 for shift := uint(0); ; shift += 7 { 7279 if shift >= 64 { 7280 return ErrIntOverflowTxn 7281 } 7282 if iNdEx >= l { 7283 return io.ErrUnexpectedEOF 7284 } 7285 b := dAtA[iNdEx] 7286 iNdEx++ 7287 v |= int(b&0x7F) << shift 7288 if b < 0x80 { 7289 break 7290 } 7291 } 7292 m.InRollback = bool(v != 0) 7293 default: 7294 iNdEx = preIndex 7295 skippy, err := skipTxn(dAtA[iNdEx:]) 7296 if err != nil { 7297 return err 7298 } 7299 if (skippy < 0) || (iNdEx+skippy) < 0 { 7300 return ErrInvalidLengthTxn 7301 } 7302 if (iNdEx + skippy) > l { 7303 return io.ErrUnexpectedEOF 7304 } 7305 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 7306 iNdEx += skippy 7307 } 7308 } 7309 7310 if iNdEx > l { 7311 return io.ErrUnexpectedEOF 7312 } 7313 return nil 7314 } 7315 func skipTxn(dAtA []byte) (n int, err error) { 7316 l := len(dAtA) 7317 iNdEx := 0 7318 depth := 0 7319 for iNdEx < l { 7320 var wire uint64 7321 for shift := uint(0); ; shift += 7 { 7322 if shift >= 64 { 7323 return 0, ErrIntOverflowTxn 7324 } 7325 if iNdEx >= l { 7326 return 0, io.ErrUnexpectedEOF 7327 } 7328 b := dAtA[iNdEx] 7329 iNdEx++ 7330 wire |= (uint64(b) & 0x7F) << shift 7331 if b < 0x80 { 7332 break 7333 } 7334 } 7335 wireType := int(wire & 0x7) 7336 switch wireType { 7337 case 0: 7338 for shift := uint(0); ; shift += 7 { 7339 if shift >= 64 { 7340 return 0, ErrIntOverflowTxn 7341 } 7342 if iNdEx >= l { 7343 return 0, io.ErrUnexpectedEOF 7344 } 7345 iNdEx++ 7346 if dAtA[iNdEx-1] < 0x80 { 7347 break 7348 } 7349 } 7350 case 1: 7351 iNdEx += 8 7352 case 2: 7353 var length int 7354 for shift := uint(0); ; shift += 7 { 7355 if shift >= 64 { 7356 return 0, ErrIntOverflowTxn 7357 } 7358 if iNdEx >= l { 7359 return 0, io.ErrUnexpectedEOF 7360 } 7361 b := dAtA[iNdEx] 7362 iNdEx++ 7363 length |= (int(b) & 0x7F) << shift 7364 if b < 0x80 { 7365 break 7366 } 7367 } 7368 if length < 0 { 7369 return 0, ErrInvalidLengthTxn 7370 } 7371 iNdEx += length 7372 case 3: 7373 depth++ 7374 case 4: 7375 if depth == 0 { 7376 return 0, ErrUnexpectedEndOfGroupTxn 7377 } 7378 depth-- 7379 case 5: 7380 iNdEx += 4 7381 default: 7382 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 7383 } 7384 if iNdEx < 0 { 7385 return 0, ErrInvalidLengthTxn 7386 } 7387 if depth == 0 { 7388 return iNdEx, nil 7389 } 7390 } 7391 return 0, io.ErrUnexpectedEOF 7392 } 7393 7394 var ( 7395 ErrInvalidLengthTxn = fmt.Errorf("proto: negative length found during unmarshaling") 7396 ErrIntOverflowTxn = fmt.Errorf("proto: integer overflow") 7397 ErrUnexpectedEndOfGroupTxn = fmt.Errorf("proto: unexpected end of group") 7398 )