[scn] rename log_ts to scn
This commit is contained in:
		@ -40,7 +40,7 @@ ObEvalCtx::ObEvalCtx(ObExecContext &exec_ctx)
 | 
			
		||||
    exec_ctx_(exec_ctx),
 | 
			
		||||
    tmp_alloc_(exec_ctx.get_eval_tmp_allocator()),
 | 
			
		||||
    datum_caster_(NULL),
 | 
			
		||||
    tmp_alloc_used_(false),
 | 
			
		||||
    tmp_alloc_used_(exec_ctx.get_tmp_alloc_used()),
 | 
			
		||||
    batch_idx_(0),
 | 
			
		||||
    batch_size_(0),
 | 
			
		||||
    expr_res_alloc_(exec_ctx.get_eval_res_allocator())
 | 
			
		||||
 | 
			
		||||
@ -255,7 +255,7 @@ public:
 | 
			
		||||
  // Can not use allocator for expression result. (ObExpr::get_str_res_mem() is used for result).
 | 
			
		||||
  common::ObArenaAllocator &tmp_alloc_;
 | 
			
		||||
  ObDatumCaster *datum_caster_;
 | 
			
		||||
  bool tmp_alloc_used_;
 | 
			
		||||
  bool &tmp_alloc_used_;
 | 
			
		||||
private:
 | 
			
		||||
  int64_t batch_idx_;
 | 
			
		||||
  int64_t batch_size_;
 | 
			
		||||
 | 
			
		||||
@ -105,7 +105,7 @@ int ObExprNLSSort::convert_to_coll_code(ObEvalCtx &ctx,
 | 
			
		||||
    } else {
 | 
			
		||||
      to_str.assign_ptr(conv_buf, result_len);
 | 
			
		||||
    }
 | 
			
		||||
    LOG_DEBUG("charset convert", K(from_str), K(from_type), K(to_str), K(result_len));
 | 
			
		||||
    LOG_DEBUG("charset convert", KPHEX(from_str.ptr(), from_str.length()), K(from_type), K(to_type), KPHEX(to_str.ptr(), to_str.length()), K(result_len));
 | 
			
		||||
  } else { 
 | 
			
		||||
    to_str.assign_ptr(from_str.ptr(), from_str.length());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -121,7 +121,8 @@ ObExecContext::ObExecContext(ObIAllocator &allocator)
 | 
			
		||||
    parent_ctx_(nullptr),
 | 
			
		||||
    nested_level_(0),
 | 
			
		||||
    is_ps_prepare_stage_(false),
 | 
			
		||||
    register_op_id_(OB_INVALID_ID)
 | 
			
		||||
    register_op_id_(OB_INVALID_ID),
 | 
			
		||||
    tmp_alloc_used_(false)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -294,6 +295,7 @@ void ObExecContext::destroy_eval_allocator()
 | 
			
		||||
{
 | 
			
		||||
  eval_res_allocator_.reset();
 | 
			
		||||
  eval_tmp_allocator_.reset();
 | 
			
		||||
  tmp_alloc_used_ = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ObExecContext::get_temp_expr_eval_ctx(const ObTempExpr &temp_expr,
 | 
			
		||||
 | 
			
		||||
@ -286,6 +286,7 @@ public:
 | 
			
		||||
 | 
			
		||||
  bool has_non_trivial_expr_op_ctx() const { return has_non_trivial_expr_op_ctx_; }
 | 
			
		||||
  void set_non_trivial_expr_op_ctx(bool v) { has_non_trivial_expr_op_ctx_ = v; }
 | 
			
		||||
  inline bool &get_tmp_alloc_used() { return tmp_alloc_used_; }
 | 
			
		||||
 | 
			
		||||
  VIRTUAL_NEED_SERIALIZE_AND_DESERIALIZE;
 | 
			
		||||
protected:
 | 
			
		||||
@ -613,6 +614,8 @@ protected:
 | 
			
		||||
  bool is_ps_prepare_stage_;
 | 
			
		||||
  // for sql plan monitor
 | 
			
		||||
  int64_t register_op_id_;
 | 
			
		||||
  // indicate if eval_tmp_allocator_ is used
 | 
			
		||||
  bool tmp_alloc_used_;
 | 
			
		||||
  // -------------------
 | 
			
		||||
private:
 | 
			
		||||
  DISALLOW_COPY_AND_ASSIGN(ObExecContext);
 | 
			
		||||
 | 
			
		||||
@ -64,16 +64,14 @@ int ObInterruptUtil::broadcast_dfo(ObDfo *dfo, int code)
 | 
			
		||||
    // 暂存上次的 id,inc_seqnum 将修改 px_interrupt_id_
 | 
			
		||||
    ObInterruptibleTaskID interrupt_id = dfo->get_interrupt_id().px_interrupt_id_;
 | 
			
		||||
    for (int64_t j = 0; j < sqcs.count(); ++j) {
 | 
			
		||||
      if (sqcs.at(j)->need_report()) {
 | 
			
		||||
        const ObAddr &addr = sqcs.at(j)->get_exec_addr();
 | 
			
		||||
        if(OB_SUCCESS != (tmp_ret = manager->interrupt(addr, interrupt_id, int_code))) {
 | 
			
		||||
          ret = tmp_ret;
 | 
			
		||||
          LOG_WARN("fail to send interrupt message to other server",
 | 
			
		||||
                  K(ret), K(int_code), K(addr), K(interrupt_id));
 | 
			
		||||
        } else {
 | 
			
		||||
          LOG_INFO("success to send interrupt message",
 | 
			
		||||
                    K(int_code), K(addr), K(interrupt_id));
 | 
			
		||||
        }
 | 
			
		||||
      const ObAddr &addr = sqcs.at(j)->get_exec_addr();
 | 
			
		||||
      if(OB_SUCCESS != (tmp_ret = manager->interrupt(addr, interrupt_id, int_code))) {
 | 
			
		||||
        ret = tmp_ret;
 | 
			
		||||
        LOG_WARN("fail to send interrupt message to other server",
 | 
			
		||||
                K(ret), K(int_code), K(addr), K(interrupt_id));
 | 
			
		||||
      } else {
 | 
			
		||||
        LOG_INFO("success to send interrupt message",
 | 
			
		||||
                  K(int_code), K(addr), K(interrupt_id));
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -476,7 +476,10 @@ int ObFastInitSqcCB::deal_with_rpc_timeout_err_safely()
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  int ret = OB_SUCCESS;
 | 
			
		||||
  ObDealWithRpcTimeoutCall call(addr_, retry_info_, timeout_ts_, trace_id_);
 | 
			
		||||
  // only if it's sure init_sqc msg is not sent to sqc successfully, we can retry the query.
 | 
			
		||||
  bool init_sqc_not_send_out = (get_error() == EASY_TIMEOUT_NOT_SENT_OUT
 | 
			
		||||
      || get_error() == EASY_DISCONNECT_NOT_SENT_OUT);
 | 
			
		||||
  ObDealWithRpcTimeoutCall call(addr_, retry_info_, timeout_ts_, trace_id_, init_sqc_not_send_out);
 | 
			
		||||
  call.ret_ = OB_TIMEOUT;
 | 
			
		||||
  ObGlobalInterruptManager *manager = ObGlobalInterruptManager::getInstance();
 | 
			
		||||
  if (OB_NOT_NULL(manager)) {
 | 
			
		||||
@ -529,7 +532,12 @@ void ObDealWithRpcTimeoutCall::deal_with_rpc_timeout_err()
 | 
			
		||||
          LOG_WARN("fail to add invalid server distinctly", K_(trace_id), K(a_ret), K_(addr));
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      ret_ = OB_RPC_CONNECT_ERROR;
 | 
			
		||||
      if (can_retry_) {
 | 
			
		||||
        // return OB_RPC_CONNECT_ERROR to retry.
 | 
			
		||||
        ret_ = OB_RPC_CONNECT_ERROR;
 | 
			
		||||
      } else {
 | 
			
		||||
        ret_ = OB_PACKET_STATUS_UNKNOWN;
 | 
			
		||||
      }
 | 
			
		||||
    } else {
 | 
			
		||||
      LOG_DEBUG("rpc return OB_TIMEOUT, and it is actually timeout, "
 | 
			
		||||
                "do not change error code", K(ret_),
 | 
			
		||||
 | 
			
		||||
@ -120,8 +120,9 @@ public:
 | 
			
		||||
  ObDealWithRpcTimeoutCall(common::ObAddr addr,
 | 
			
		||||
      ObQueryRetryInfo *retry_info,
 | 
			
		||||
      int64_t timeout_ts,
 | 
			
		||||
      common::ObCurTraceId::TraceId &trace_id) : addr_(addr), retry_info_(retry_info),
 | 
			
		||||
      timeout_ts_(timeout_ts), trace_id_(trace_id), ret_(common::OB_TIMEOUT) {}
 | 
			
		||||
      common::ObCurTraceId::TraceId &trace_id,
 | 
			
		||||
      bool retry) : addr_(addr), retry_info_(retry_info),
 | 
			
		||||
      timeout_ts_(timeout_ts), trace_id_(trace_id), ret_(common::OB_TIMEOUT), can_retry_(retry) {}
 | 
			
		||||
  ~ObDealWithRpcTimeoutCall() = default;
 | 
			
		||||
  void operator() (hash::HashMapPair<ObInterruptibleTaskID,
 | 
			
		||||
      ObInterruptCheckerNode *> &entry);
 | 
			
		||||
@ -132,6 +133,7 @@ public:
 | 
			
		||||
  int64_t timeout_ts_;
 | 
			
		||||
  common::ObCurTraceId::TraceId trace_id_;
 | 
			
		||||
  int ret_;
 | 
			
		||||
  bool can_retry_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class ObFastInitSqcCB
 | 
			
		||||
 | 
			
		||||
@ -185,7 +185,14 @@ int ObPxSqcAsyncProxy::wait_all() {
 | 
			
		||||
        if (phy_plan_ctx_->get_timeout_timestamp() -
 | 
			
		||||
          ObTimeUtility::current_time() > 0) {
 | 
			
		||||
          error_index_ = idx;
 | 
			
		||||
          ret = OB_RPC_CONNECT_ERROR;
 | 
			
		||||
          bool init_sqc_not_send_out = (callback.get_error() == EASY_TIMEOUT_NOT_SENT_OUT
 | 
			
		||||
              || callback.get_error() == EASY_DISCONNECT_NOT_SENT_OUT);
 | 
			
		||||
          if (init_sqc_not_send_out) {
 | 
			
		||||
            // only if it's sure init_sqc msg is not sent to sqc successfully, return OB_RPC_CONNECT_ERROR to retry.
 | 
			
		||||
            ret = OB_RPC_CONNECT_ERROR;
 | 
			
		||||
          } else {
 | 
			
		||||
            ret = OB_PACKET_STATUS_UNKNOWN;
 | 
			
		||||
          }
 | 
			
		||||
        } else {
 | 
			
		||||
          ret = OB_TIMEOUT;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -65,7 +65,7 @@ int FlashBackItem::set_flashback_query_info(ObEvalCtx &eval_ctx, ObDASScanRtDef
 | 
			
		||||
      if (ObUInt64Type != expr->datum_meta_.type_) {
 | 
			
		||||
        ret = OB_ERR_UNEXPECTED;
 | 
			
		||||
        LOG_WARN("type not match", K(ret));
 | 
			
		||||
      } else if (OB_FAIL(scan_rtdef.fb_snapshot_.convert_for_gts(datum->get_int()))) {
 | 
			
		||||
      } else if (OB_FAIL(scan_rtdef.fb_snapshot_.convert_for_sql(datum->get_int()))) {
 | 
			
		||||
        LOG_WARN("failed to convert for gts", K(ret));
 | 
			
		||||
      } else {
 | 
			
		||||
        LOG_TRACE("fb_snapshot_ result", K(scan_rtdef.fb_snapshot_), K(*datum));
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user