Пример #1
0
// InternalResolveIntentRange resolves write intents in the specified
// key range according to the status of the transaction which created it.
func (r *Range) InternalResolveIntentRange(batch engine.Engine, ms *engine.MVCCStats,
	args *proto.InternalResolveIntentRangeRequest, reply *proto.InternalResolveIntentRangeResponse) {
	if args.Txn == nil {
		reply.SetGoError(util.Errorf("no transaction specified to InternalResolveIntentRange"))
		return
	}
	_, err := engine.MVCCResolveWriteIntentRange(batch, ms, args.Key, args.EndKey, 0, args.Timestamp, args.Txn)
	reply.SetGoError(err)
}
Пример #2
0
// InternalResolveIntentRange resolves write intents in the specified
// key range according to the status of the transaction which created it.
func (r *Range) InternalResolveIntentRange(batch engine.Engine, ms *engine.MVCCStats,
	args proto.InternalResolveIntentRangeRequest) (proto.InternalResolveIntentRangeResponse, error) {
	var reply proto.InternalResolveIntentRangeResponse

	if args.Txn == nil {
		return reply, util.Errorf("no transaction specified to InternalResolveIntentRange")
	}
	_, err := engine.MVCCResolveWriteIntentRange(batch, ms, args.Key, args.EndKey, 0, args.Timestamp, args.Txn)
	return reply, err
}