YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/Users/deen/code/yugabyte-db/src/yb/tablet/operations/update_txn_operation.h
Line
Count
Source
1
//
2
// Copyright (c) YugaByte, Inc.
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5
// in compliance with the License.  You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software distributed under the License
10
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
// or implied.  See the License for the specific language governing permissions and limitations
12
// under the License.
13
//
14
//
15
16
#ifndef YB_TABLET_OPERATIONS_UPDATE_TXN_OPERATION_H
17
#define YB_TABLET_OPERATIONS_UPDATE_TXN_OPERATION_H
18
19
#include "yb/tablet/operations/operation.h"
20
21
#include "yb/tablet/operations.pb.h"
22
23
namespace yb {
24
namespace tablet {
25
26
class UpdateTxnOperation
27
    : public OperationBase<OperationType::kUpdateTransaction, TransactionStatePB> {
28
 public:
29
  template <class... Args>
30
  explicit UpdateTxnOperation(Args&&... args)
31
5.95M
      : OperationBase(std::forward<Args>(args)...) {}
yb::tablet::UpdateTxnOperation::UpdateTxnOperation<yb::tablet::Tablet*, yb::tablet::TransactionStatePB const*>(yb::tablet::Tablet*&&, yb::tablet::TransactionStatePB const*&&)
Line
Count
Source
31
2.52M
      : OperationBase(std::forward<Args>(args)...) {}
yb::tablet::UpdateTxnOperation::UpdateTxnOperation<std::nullptr_t, yb::tablet::TransactionStatePB*>(std::nullptr_t&&, yb::tablet::TransactionStatePB*&&)
Line
Count
Source
31
33.7k
      : OperationBase(std::forward<Args>(args)...) {}
yb::tablet::UpdateTxnOperation::UpdateTxnOperation<yb::tablet::Tablet*>(yb::tablet::Tablet*&&)
Line
Count
Source
31
3.39M
      : OperationBase(std::forward<Args>(args)...) {}
32
33
8.98M
  bool use_mvcc() const override {
34
8.98M
    return true;
35
8.98M
  }
36
37
 private:
38
  TransactionCoordinator& transaction_coordinator() const;
39
  CHECKED_STATUS Prepare() override;
40
  CHECKED_STATUS DoReplicated(int64_t leader_term, Status* complete_status) override;
41
  CHECKED_STATUS DoAborted(const Status& status) override;
42
};
43
44
} // namespace tablet
45
} // namespace yb
46
47
#endif // YB_TABLET_OPERATIONS_UPDATE_TXN_OPERATION_H