Documentation ¶
Index ¶
- Constants
- Variables
- func GetTS() (int64, int64)
- func InternalRegionMetaKey(regionId uint64) []byte
- func NewDBWriter(bundle *mvcc.DBBundle) mvcc.DBWriter
- type Detector
- type DetectorClient
- type DetectorServer
- type ErrAlreadyCommitted
- type ErrCommitExpire
- type ErrConflict
- type ErrDeadlock
- type ErrInvalidOp
- type ErrKeyAlreadyExists
- type ErrLocked
- type ErrRetryable
- type ErrTxnNotFound
- type GCCompactionFilter
- type InnerServer
- type MPPTaskHandlerMap
- type MVCCStore
- func (store *MVCCStore) BatchGet(reqCtx *requestCtx, keys [][]byte, version uint64) []*kvrpcpb.KvPair
- func (store *MVCCStore) CheckKeysLock(startTS uint64, resolved []uint64, keys ...[]byte) error
- func (store *MVCCStore) CheckRangeLock(startTS uint64, startKey, endKey []byte, resolved []uint64) error
- func (store *MVCCStore) CheckSecondaryLocks(reqCtx *requestCtx, keys [][]byte, startTS uint64) (SecondaryLocksStatus, error)
- func (store *MVCCStore) CheckTxnStatus(reqCtx *requestCtx, req *kvrpcpb.CheckTxnStatusRequest) (txnStatusRes TxnStatus, err error)
- func (store *MVCCStore) Cleanup(reqCtx *requestCtx, key []byte, startTS, currentTs uint64) error
- func (store *MVCCStore) Close() error
- func (store *MVCCStore) Commit(req *requestCtx, keys [][]byte, startTS, commitTS uint64) error
- func (store *MVCCStore) DeleteFileInRange(start, end []byte)
- func (store *MVCCStore) MvccGetByKey(reqCtx *requestCtx, key []byte) (*kvrpcpb.MvccInfo, error)
- func (store *MVCCStore) MvccGetByStartTs(reqCtx *requestCtx, startTs uint64) (*kvrpcpb.MvccInfo, []byte, error)
- func (store *MVCCStore) PessimisticLock(reqCtx *requestCtx, req *kvrpcpb.PessimisticLockRequest, ...) (*lockwaiter.Waiter, error)
- func (store *MVCCStore) PessimisticRollback(reqCtx *requestCtx, req *kvrpcpb.PessimisticRollbackRequest) error
- func (store *MVCCStore) PhysicalScanLock(startKey []byte, maxTS uint64, limit int) []*kvrpcpb.LockInfo
- func (store *MVCCStore) Prewrite(reqCtx *requestCtx, req *kvrpcpb.PrewriteRequest) error
- func (store *MVCCStore) ResolveLock(reqCtx *requestCtx, lockKeys [][]byte, startTS, commitTS uint64) error
- func (store *MVCCStore) Rollback(reqCtx *requestCtx, keys [][]byte, startTS uint64) error
- func (store *MVCCStore) Scan(reqCtx *requestCtx, req *kvrpcpb.ScanRequest) []*kvrpcpb.KvPair
- func (store *MVCCStore) ScanLock(reqCtx *requestCtx, maxTS uint64, limit int) ([]*kvrpcpb.LockInfo, error)
- func (store *MVCCStore) StartDeadlockDetection(isRaft bool)
- func (store *MVCCStore) TxnHeartBeat(reqCtx *requestCtx, req *kvrpcpb.TxnHeartBeatRequest) (lockTTL uint64, err error)
- func (store *MVCCStore) UpdateSafePoint(safePoint uint64)
- type MockPD
- func (pd *MockPD) AllocID(ctx context.Context) (uint64, error)
- func (pd *MockPD) AskBatchSplit(ctx context.Context, region *metapb.Region, count int) (*pdpb.AskBatchSplitResponse, error)
- func (pd *MockPD) AskSplit(ctx context.Context, region *metapb.Region) (*pdpb.AskSplitResponse, error)
- func (pd *MockPD) Bootstrap(ctx context.Context, store *metapb.Store, region *metapb.Region) (*pdpb.BootstrapResponse, error)
- func (pd *MockPD) Close()
- func (pd *MockPD) GetAllStores(ctx context.Context, opts ...pdclient.GetStoreOption) ([]*metapb.Store, error)
- func (pd *MockPD) GetClusterID(ctx context.Context) uint64
- func (pd *MockPD) GetGCSafePoint(ctx context.Context) (uint64, error)
- func (pd *MockPD) GetPrevRegion(ctx context.Context, key []byte) (*pdclient.Region, error)
- func (pd *MockPD) GetRegion(ctx context.Context, key []byte) (*pdclient.Region, error)
- func (pd *MockPD) GetRegionByID(ctx context.Context, regionID uint64) (*pdclient.Region, error)
- func (pd *MockPD) GetStore(ctx context.Context, storeID uint64) (*metapb.Store, error)
- func (pd *MockPD) GetTS(ctx context.Context) (int64, int64, error)
- func (pd *MockPD) IsBootstrapped(ctx context.Context) (bool, error)
- func (pd *MockPD) PutStore(ctx context.Context, store *metapb.Store) error
- func (pd *MockPD) ReportBatchSplit(ctx context.Context, regions []*metapb.Region) error
- func (pd *MockPD) ReportRegion(*pdpb.RegionHeartbeatRequest)
- func (pd *MockPD) ScanRegions(ctx context.Context, startKey []byte, endKey []byte, limit int) ([]*pdclient.Region, error)
- func (pd *MockPD) ScatterRegion(ctx context.Context, regionID uint64) error
- func (pd *MockPD) SetRegionHeartbeatResponseHandler(h func(*pdpb.RegionHeartbeatResponse))
- func (pd *MockPD) StoreHeartbeat(ctx context.Context, stats *pdpb.StoreStats) error
- func (pd *MockPD) UpdateGCSafePoint(ctx context.Context, safePoint uint64) (uint64, error)
- type MockRegionManager
- func (rm *MockRegionManager) AddPeer(regionID, storeID, peerID uint64)
- func (rm *MockRegionManager) AddStore(storeID uint64, addr string, labels ...*metapb.StoreLabel)
- func (rm *MockRegionManager) AllocID() uint64
- func (rm *MockRegionManager) AllocIDs(n int) []uint64
- func (rm *MockRegionManager) Bootstrap(stores []*metapb.Store, region *metapb.Region) error
- func (rm *MockRegionManager) Close() error
- func (rm *MockRegionManager) GetAllStores() []*metapb.Store
- func (rm *MockRegionManager) GetRegion(id uint64) *metapb.Region
- func (rm *MockRegionManager) GetRegionByEndKey(key []byte) (region *metapb.Region, peer *metapb.Peer)
- func (rm *MockRegionManager) GetRegionByKey(key []byte) (region *metapb.Region, peer *metapb.Peer)
- func (rm *MockRegionManager) GetRegionFromCtx(ctx *kvrpcpb.Context) (*regionCtx, *errorpb.Error)
- func (rm *MockRegionManager) GetStoreAddrByStoreId(storeId uint64) (string, error)
- func (rm *MockRegionManager) GetStoreIDByAddr(addr string) (uint64, error)
- func (rm *MockRegionManager) GetStoreInfoFromCtx(ctx *kvrpcpb.Context) (string, uint64, *errorpb.Error)
- func (rm *MockRegionManager) IsBootstrapped() (bool, error)
- func (rm *MockRegionManager) RemoveStore(storeID uint64)
- func (rm *MockRegionManager) ScanRegions(startKey, endKey []byte, limit int) []*pdclient.Region
- func (rm *MockRegionManager) Split(regionID, newRegionID uint64, key []byte, peerIDs []uint64, ...)
- func (rm *MockRegionManager) SplitIndex(tableID, indexID int64, count int)
- func (rm *MockRegionManager) SplitKeys(start, end kv.Key, count int)
- func (rm *MockRegionManager) SplitRaw(regionID, newRegionID uint64, rawKey []byte, peerIDs []uint64, ...) *metapb.Region
- func (rm *MockRegionManager) SplitRegion(req *kvrpcpb.SplitRegionRequest) *kvrpcpb.SplitRegionResponse
- func (rm *MockRegionManager) SplitTable(tableID int64, count int)
- type RaftRegionManager
- func (rm *RaftRegionManager) Close() error
- func (rm *RaftRegionManager) GetRegionFromCtx(ctx *kvrpcpb.Context) (*regionCtx, *errorpb.Error)
- func (rm *RaftRegionManager) GetStoreAddrByStoreId(storeId uint64) (string, error)
- func (rm *RaftRegionManager) GetStoreIDByAddr(addr string) (uint64, error)
- func (rm *RaftRegionManager) GetStoreInfoFromCtx(ctx *kvrpcpb.Context) (string, uint64, *errorpb.Error)
- func (rm *RaftRegionManager) OnPeerApplySnap(ctx *raftstore.PeerEventContext, region *metapb.Region)
- func (rm *RaftRegionManager) OnPeerCreate(ctx *raftstore.PeerEventContext, region *metapb.Region)
- func (rm *RaftRegionManager) OnPeerDestroy(ctx *raftstore.PeerEventContext)
- func (rm *RaftRegionManager) OnRegionConfChange(ctx *raftstore.PeerEventContext, epoch *metapb.RegionEpoch)
- func (rm *RaftRegionManager) OnRoleChange(regionId uint64, newState raft.StateType)
- func (rm *RaftRegionManager) OnSplitRegion(derived *metapb.Region, regions []*metapb.Region, ...)
- func (rm *RaftRegionManager) SplitRegion(req *kvrpcpb.SplitRegionRequest) *kvrpcpb.SplitRegionResponse
- type RegionError
- type RegionManager
- type RegionOptions
- type SafePoint
- type SecondaryLocksStatus
- type Server
- func (svr *Server) BatchCommands(stream tikvpb.Tikv_BatchCommandsServer) error
- func (svr *Server) BatchCoprocessor(req *coprocessor.BatchRequest, ...) error
- func (svr *Server) BatchRaft(stream tikvpb.Tikv_BatchRaftServer) error
- func (svr *Server) CancelMPPTask(_ context.Context, _ *mpp.CancelTaskRequest) (*mpp.CancelTaskResponse, error)
- func (svr *Server) CheckLeader(context.Context, *kvrpcpb.CheckLeaderRequest) (*kvrpcpb.CheckLeaderResponse, error)
- func (svr *Server) CheckLockObserver(context.Context, *kvrpcpb.CheckLockObserverRequest) (*kvrpcpb.CheckLockObserverResponse, error)
- func (svr *Server) Coprocessor(_ context.Context, req *coprocessor.Request) (*coprocessor.Response, error)
- func (svr *Server) CoprocessorStream(*coprocessor.Request, tikvpb.Tikv_CoprocessorStreamServer) error
- func (svr *Server) CreateMPPTaskHandler(meta *mpp.TaskMeta, storeId uint64) (*cophandler.MPPTaskHandler, error)
- func (svr *Server) Detect(stream deadlockPb.Deadlock_DetectServer) error
- func (svr *Server) DispatchMPPTask(_ context.Context, _ *mpp.DispatchTaskRequest) (*mpp.DispatchTaskResponse, error)
- func (svr *Server) DispatchMPPTaskWithStoreId(ctx context.Context, req *mpp.DispatchTaskRequest, storeId uint64) (*mpp.DispatchTaskResponse, error)
- func (svr *Server) EstablishMPPConnection(*mpp.EstablishMPPConnectionRequest, tikvpb.Tikv_EstablishMPPConnectionServer) error
- func (svr *Server) EstablishMPPConnectionWithStoreId(req *mpp.EstablishMPPConnectionRequest, ...) error
- func (svr *Server) GetMPPTaskHandler(taskId int64, storeId uint64) (*cophandler.MPPTaskHandler, error)
- func (svr *Server) GetStoreAddrByStoreId(storeId uint64) (string, error)
- func (svr *Server) GetStoreIdByAddr(addr string) (uint64, error)
- func (svr *Server) GetWaitForEntries(ctx context.Context, req *deadlockPb.WaitForEntriesRequest) (*deadlockPb.WaitForEntriesResponse, error)
- func (svr *Server) KVPessimisticRollback(ctx context.Context, req *kvrpcpb.PessimisticRollbackRequest) (*kvrpcpb.PessimisticRollbackResponse, error)
- func (svr *Server) KvBatchGet(ctx context.Context, req *kvrpcpb.BatchGetRequest) (*kvrpcpb.BatchGetResponse, error)
- func (svr *Server) KvBatchRollback(ctx context.Context, req *kvrpcpb.BatchRollbackRequest) (*kvrpcpb.BatchRollbackResponse, error)
- func (svr *Server) KvCheckSecondaryLocks(ctx context.Context, req *kvrpcpb.CheckSecondaryLocksRequest) (*kvrpcpb.CheckSecondaryLocksResponse, error)
- func (svr *Server) KvCheckTxnStatus(ctx context.Context, req *kvrpcpb.CheckTxnStatusRequest) (*kvrpcpb.CheckTxnStatusResponse, error)
- func (svr *Server) KvCleanup(ctx context.Context, req *kvrpcpb.CleanupRequest) (*kvrpcpb.CleanupResponse, error)
- func (svr *Server) KvCommit(ctx context.Context, req *kvrpcpb.CommitRequest) (*kvrpcpb.CommitResponse, error)
- func (svr *Server) KvDeleteRange(ctx context.Context, req *kvrpcpb.DeleteRangeRequest) (*kvrpcpb.DeleteRangeResponse, error)
- func (svr *Server) KvGC(ctx context.Context, req *kvrpcpb.GCRequest) (*kvrpcpb.GCResponse, error)
- func (svr *Server) KvGet(ctx context.Context, req *kvrpcpb.GetRequest) (*kvrpcpb.GetResponse, error)
- func (svr *Server) KvImport(context.Context, *kvrpcpb.ImportRequest) (*kvrpcpb.ImportResponse, error)
- func (svr *Server) KvPessimisticLock(ctx context.Context, req *kvrpcpb.PessimisticLockRequest) (*kvrpcpb.PessimisticLockResponse, error)
- func (svr *Server) KvPrewrite(ctx context.Context, req *kvrpcpb.PrewriteRequest) (*kvrpcpb.PrewriteResponse, error)
- func (svr *Server) KvResolveLock(ctx context.Context, req *kvrpcpb.ResolveLockRequest) (*kvrpcpb.ResolveLockResponse, error)
- func (svr *Server) KvScan(ctx context.Context, req *kvrpcpb.ScanRequest) (*kvrpcpb.ScanResponse, error)
- func (svr *Server) KvScanLock(ctx context.Context, req *kvrpcpb.ScanLockRequest) (*kvrpcpb.ScanLockResponse, error)
- func (svr *Server) KvTxnHeartBeat(ctx context.Context, req *kvrpcpb.TxnHeartBeatRequest) (*kvrpcpb.TxnHeartBeatResponse, error)
- func (svr *Server) MvccGetByKey(ctx context.Context, req *kvrpcpb.MvccGetByKeyRequest) (*kvrpcpb.MvccGetByKeyResponse, error)
- func (svr *Server) MvccGetByStartTs(ctx context.Context, req *kvrpcpb.MvccGetByStartTsRequest) (*kvrpcpb.MvccGetByStartTsResponse, error)
- func (svr *Server) PhysicalScanLock(ctx context.Context, req *kvrpcpb.PhysicalScanLockRequest) (*kvrpcpb.PhysicalScanLockResponse, error)
- func (svr *Server) Raft(stream tikvpb.Tikv_RaftServer) error
- func (svr *Server) RawBatchDelete(context.Context, *kvrpcpb.RawBatchDeleteRequest) (*kvrpcpb.RawBatchDeleteResponse, error)
- func (svr *Server) RawBatchGet(context.Context, *kvrpcpb.RawBatchGetRequest) (*kvrpcpb.RawBatchGetResponse, error)
- func (svr *Server) RawBatchPut(context.Context, *kvrpcpb.RawBatchPutRequest) (*kvrpcpb.RawBatchPutResponse, error)
- func (svr *Server) RawBatchScan(context.Context, *kvrpcpb.RawBatchScanRequest) (*kvrpcpb.RawBatchScanResponse, error)
- func (svr *Server) RawDelete(context.Context, *kvrpcpb.RawDeleteRequest) (*kvrpcpb.RawDeleteResponse, error)
- func (svr *Server) RawDeleteRange(context.Context, *kvrpcpb.RawDeleteRangeRequest) (*kvrpcpb.RawDeleteRangeResponse, error)
- func (svr *Server) RawGet(context.Context, *kvrpcpb.RawGetRequest) (*kvrpcpb.RawGetResponse, error)
- func (svr *Server) RawGetKeyTTL(ctx context.Context, req *kvrpcpb.RawGetKeyTTLRequest) (*kvrpcpb.RawGetKeyTTLResponse, error)
- func (svr *Server) RawPut(context.Context, *kvrpcpb.RawPutRequest) (*kvrpcpb.RawPutResponse, error)
- func (svr *Server) RawScan(context.Context, *kvrpcpb.RawScanRequest) (*kvrpcpb.RawScanResponse, error)
- func (svr *Server) ReadIndex(context.Context, *kvrpcpb.ReadIndexRequest) (*kvrpcpb.ReadIndexResponse, error)
- func (svr *Server) RegisterLockObserver(context.Context, *kvrpcpb.RegisterLockObserverRequest) (*kvrpcpb.RegisterLockObserverResponse, error)
- func (svr *Server) RemoveLockObserver(context.Context, *kvrpcpb.RemoveLockObserverRequest) (*kvrpcpb.RemoveLockObserverResponse, error)
- func (svr *Server) RemoveMPPTaskHandler(taskId int64, storeId uint64) error
- func (svr *Server) Snapshot(stream tikvpb.Tikv_SnapshotServer) error
- func (svr *Server) SplitRegion(ctx context.Context, req *kvrpcpb.SplitRegionRequest) (*kvrpcpb.SplitRegionResponse, error)
- func (svr *Server) Stop()
- func (svr *Server) UnsafeDestroyRange(ctx context.Context, req *kvrpcpb.UnsafeDestroyRangeRequest) (*kvrpcpb.UnsafeDestroyRangeResponse, error)
- func (svr *Server) VerBatchGet(context.Context, *kvrpcpb.VerBatchGetRequest) (*kvrpcpb.VerBatchGetResponse, error)
- func (svr *Server) VerBatchMut(context.Context, *kvrpcpb.VerBatchMutRequest) (*kvrpcpb.VerBatchMutResponse, error)
- func (svr *Server) VerDeleteRange(context.Context, *kvrpcpb.VerDeleteRangeRequest) (*kvrpcpb.VerDeleteRangeResponse, error)
- func (svr *Server) VerGet(context.Context, *kvrpcpb.VerGetRequest) (*kvrpcpb.VerGetResponse, error)
- func (svr *Server) VerMut(context.Context, *kvrpcpb.VerMutRequest) (*kvrpcpb.VerMutResponse, error)
- func (svr *Server) VerScan(context.Context, *kvrpcpb.VerScanRequest) (*kvrpcpb.VerScanResponse, error)
- type StandAloneRegionManager
- func (rm *StandAloneRegionManager) Close() error
- func (rm *StandAloneRegionManager) GetRegionFromCtx(ctx *kvrpcpb.Context) (*regionCtx, *errorpb.Error)
- func (rm *StandAloneRegionManager) GetStoreAddrByStoreId(storeId uint64) (string, error)
- func (rm *StandAloneRegionManager) GetStoreIDByAddr(addr string) (uint64, error)
- func (rm *StandAloneRegionManager) GetStoreInfoFromCtx(ctx *kvrpcpb.Context) (string, uint64, *errorpb.Error)
- func (rm *StandAloneRegionManager) SplitRegion(req *kvrpcpb.SplitRegionRequest) *kvrpcpb.SplitRegionResponse
- type StandAlongInnerServer
- func (is *StandAlongInnerServer) BatchRaft(stream tikvpb.Tikv_BatchRaftServer) error
- func (is *StandAlongInnerServer) Raft(stream tikvpb.Tikv_RaftServer) error
- func (is *StandAlongInnerServer) Setup(pdClient pd.Client)
- func (is *StandAlongInnerServer) Snapshot(stream tikvpb.Tikv_SnapshotServer) error
- func (is *StandAlongInnerServer) Start(pdClient pd.Client) error
- func (is *StandAlongInnerServer) Stop() error
- type TxnStatus
Constants ¶
const ( Follower = iota Leader )
Follower will send detection rpc to Leader
Variables ¶
var ( ErrLockNotFound = ErrRetryable("lock not found") ErrAlreadyRollback = ErrRetryable("already rollback") ErrReplaced = ErrRetryable("replaced by another transaction") )
var ( InternalKeyPrefix = []byte{0xff} InternalRegionMetaPrefix = append(InternalKeyPrefix, "region"...) InternalStoreMetaKey = append(InternalKeyPrefix, "store"...) InternalSafePointKey = append(InternalKeyPrefix, "safepoint"...) )
Functions ¶
func InternalRegionMetaKey ¶
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector detects deadlock.
func NewDetector ¶
NewDetector creates a new Detector.
func (*Detector) CleanUpWaitFor ¶
CleanUpWaitFor removes a key in the wait for entry for the transaction.
func (*Detector) Detect ¶
func (d *Detector) Detect(sourceTxn, waitForTxn, keyHash uint64) *ErrDeadlock
Detect detects deadlock for the sourceTxn on a locked key.
type DetectorClient ¶
type DetectorClient struct {
// contains filtered or unexported fields
}
DetectorClient is a util used for distributed deadlock detection
func NewDetectorClient ¶
func NewDetectorClient(waiterMgr *lockwaiter.Manager, pdClient pd.Client) *DetectorClient
NewDeadlockDetector will create a new detector util, entryTTL is used for recycling the lock wait edge in detector wait wap. chSize is the pending detection sending task size(used on non leader node)
func (*DetectorClient) CleanUp ¶
func (dt *DetectorClient) CleanUp(startTs uint64)
user interfaces Cleanup processes cleaup task on local detector
func (*DetectorClient) CleanUpWaitFor ¶
func (dt *DetectorClient) CleanUpWaitFor(txnTs, waitForTxn, keyHash uint64)
CleanUpWaitFor cleans up the specific wait edge in detector's wait map
type DetectorServer ¶
type DetectorServer struct { Detector *Detector // contains filtered or unexported fields }
func NewDetectorServer ¶
func NewDetectorServer() *DetectorServer
NewDetectorServer creates local detector used by RPC detection handler
func (*DetectorServer) ChangeRole ¶
func (ds *DetectorServer) ChangeRole(newRole int32)
func (*DetectorServer) Detect ¶
func (ds *DetectorServer) Detect(req *deadlockPb.DeadlockRequest) *deadlockPb.DeadlockResponse
func (*DetectorServer) IsLeader ¶
func (ds *DetectorServer) IsLeader() bool
type ErrAlreadyCommitted ¶
type ErrAlreadyCommitted uint64
ErrAlreadyCommitted is returned specially when client tries to rollback a committed lock.
func (ErrAlreadyCommitted) Error ¶
func (e ErrAlreadyCommitted) Error() string
type ErrCommitExpire ¶
ErrCommitExpire is returned when commit key commitTs smaller than lock.MinCommitTs
func (*ErrCommitExpire) Error ¶
func (e *ErrCommitExpire) Error() string
type ErrConflict ¶
func (*ErrConflict) Error ¶
func (e *ErrConflict) Error() string
type ErrDeadlock ¶
ErrDeadlock is returned when deadlock is detected.
func (ErrDeadlock) Error ¶
func (e ErrDeadlock) Error() string
type ErrInvalidOp ¶
type ErrInvalidOp struct {
// contains filtered or unexported fields
}
func (ErrInvalidOp) Error ¶
func (e ErrInvalidOp) Error() string
type ErrKeyAlreadyExists ¶
type ErrKeyAlreadyExists struct {
Key []byte
}
func (ErrKeyAlreadyExists) Error ¶
func (e ErrKeyAlreadyExists) Error() string
type ErrLocked ¶
ErrLocked is returned when trying to Read/Write on a locked key. Client should backoff or cleanup the lock then retry.
func BuildLockErr ¶
BuildLockErr generates ErrKeyLocked objects
type ErrRetryable ¶
type ErrRetryable string
ErrRetryable suggests that client may restart the txn. e.g. write conflict.
func (ErrRetryable) Error ¶
func (e ErrRetryable) Error() string
type ErrTxnNotFound ¶
ErrTxnNotFound is returned if the required txn info not found on storage
func (*ErrTxnNotFound) Error ¶
func (e *ErrTxnNotFound) Error() string
type GCCompactionFilter ¶
type GCCompactionFilter struct {
// contains filtered or unexported fields
}
GCCompactionFilter implements the badger.CompactionFilter interface.
func (*GCCompactionFilter) Filter ¶
func (f *GCCompactionFilter) Filter(key, value, userMeta []byte) badger.Decision
Filter implements the badger.CompactionFilter interface. Since we use txn ts as badger version, we only need to filter Delete, Rollback and Op_Lock. It is called for the first valid version before safe point, older versions are discarded automatically.
func (*GCCompactionFilter) Guards ¶
func (f *GCCompactionFilter) Guards() []badger.Guard
type InnerServer ¶
type InnerServer interface { Setup(pdClient pd.Client) Start(pdClient pd.Client) error Stop() error Raft(stream tikvpb.Tikv_RaftServer) error BatchRaft(stream tikvpb.Tikv_BatchRaftServer) error Snapshot(stream tikvpb.Tikv_SnapshotServer) error }
type MPPTaskHandlerMap ¶
type MPPTaskHandlerMap struct {
// contains filtered or unexported fields
}
type MVCCStore ¶
type MVCCStore struct { DeadlockDetectCli *DetectorClient DeadlockDetectSvr *DetectorServer // contains filtered or unexported fields }
MVCCStore is a wrapper of badger.DB to provide MVCC functions.
func NewMVCCStore ¶
func NewMVCCStore(conf *config.Config, bundle *mvcc.DBBundle, dataDir string, safePoint *SafePoint, writer mvcc.DBWriter, pdClient pd.Client) *MVCCStore
NewMVCCStore creates a new MVCCStore
func (*MVCCStore) CheckKeysLock ¶
func (*MVCCStore) CheckRangeLock ¶
func (*MVCCStore) CheckSecondaryLocks ¶
func (store *MVCCStore) CheckSecondaryLocks(reqCtx *requestCtx, keys [][]byte, startTS uint64) (SecondaryLocksStatus, error)
func (*MVCCStore) CheckTxnStatus ¶
func (store *MVCCStore) CheckTxnStatus(reqCtx *requestCtx, req *kvrpcpb.CheckTxnStatusRequest) (txnStatusRes TxnStatus, err error)
func (*MVCCStore) DeleteFileInRange ¶
func (*MVCCStore) MvccGetByKey ¶
MvccGetByKey gets mvcc information using input key as rawKey
func (*MVCCStore) MvccGetByStartTs ¶
func (*MVCCStore) PessimisticLock ¶
func (store *MVCCStore) PessimisticLock(reqCtx *requestCtx, req *kvrpcpb.PessimisticLockRequest, resp *kvrpcpb.PessimisticLockResponse) (*lockwaiter.Waiter, error)
func (*MVCCStore) PessimisticRollback ¶
func (store *MVCCStore) PessimisticRollback(reqCtx *requestCtx, req *kvrpcpb.PessimisticRollbackRequest) error
func (*MVCCStore) PhysicalScanLock ¶
func (*MVCCStore) Prewrite ¶
func (store *MVCCStore) Prewrite(reqCtx *requestCtx, req *kvrpcpb.PrewriteRequest) error
func (*MVCCStore) ResolveLock ¶
func (*MVCCStore) Scan ¶
func (store *MVCCStore) Scan(reqCtx *requestCtx, req *kvrpcpb.ScanRequest) []*kvrpcpb.KvPair
func (*MVCCStore) StartDeadlockDetection ¶
func (*MVCCStore) TxnHeartBeat ¶
func (store *MVCCStore) TxnHeartBeat(reqCtx *requestCtx, req *kvrpcpb.TxnHeartBeatRequest) (lockTTL uint64, err error)
func (*MVCCStore) UpdateSafePoint ¶
type MockPD ¶
type MockPD struct {
// contains filtered or unexported fields
}
func NewMockPD ¶
func NewMockPD(rm *MockRegionManager) *MockPD
func (*MockPD) AskBatchSplit ¶
func (*MockPD) GetAllStores ¶
func (*MockPD) GetGCSafePoint ¶
func (*MockPD) GetPrevRegion ¶
func (*MockPD) GetRegionByID ¶
func (*MockPD) ReportBatchSplit ¶
func (*MockPD) ReportRegion ¶
func (pd *MockPD) ReportRegion(*pdpb.RegionHeartbeatRequest)
func (*MockPD) ScanRegions ¶
func (*MockPD) ScatterRegion ¶
func (*MockPD) SetRegionHeartbeatResponseHandler ¶
func (pd *MockPD) SetRegionHeartbeatResponseHandler(h func(*pdpb.RegionHeartbeatResponse))
func (*MockPD) StoreHeartbeat ¶
type MockRegionManager ¶
type MockRegionManager struct {
// contains filtered or unexported fields
}
func NewMockRegionManager ¶
func NewMockRegionManager(bundle *mvcc.DBBundle, clusterID uint64, opts RegionOptions) (*MockRegionManager, error)
func (*MockRegionManager) AddPeer ¶
func (rm *MockRegionManager) AddPeer(regionID, storeID, peerID uint64)
func (*MockRegionManager) AddStore ¶
func (rm *MockRegionManager) AddStore(storeID uint64, addr string, labels ...*metapb.StoreLabel)
AddStore adds a new Store to the cluster.
func (*MockRegionManager) AllocID ¶
func (rm *MockRegionManager) AllocID() uint64
func (*MockRegionManager) AllocIDs ¶
func (rm *MockRegionManager) AllocIDs(n int) []uint64
func (*MockRegionManager) Close ¶
func (rm *MockRegionManager) Close() error
func (*MockRegionManager) GetAllStores ¶
func (rm *MockRegionManager) GetAllStores() []*metapb.Store
func (*MockRegionManager) GetRegion ¶
func (rm *MockRegionManager) GetRegion(id uint64) *metapb.Region
func (*MockRegionManager) GetRegionByEndKey ¶
func (*MockRegionManager) GetRegionByKey ¶
func (*MockRegionManager) GetRegionFromCtx ¶
func (rm *MockRegionManager) GetRegionFromCtx(ctx *kvrpcpb.Context) (*regionCtx, *errorpb.Error)
func (*MockRegionManager) GetStoreAddrByStoreId ¶
func (rm *MockRegionManager) GetStoreAddrByStoreId(storeId uint64) (string, error)
func (*MockRegionManager) GetStoreIDByAddr ¶
func (rm *MockRegionManager) GetStoreIDByAddr(addr string) (uint64, error)
func (*MockRegionManager) GetStoreInfoFromCtx ¶
func (*MockRegionManager) IsBootstrapped ¶
func (rm *MockRegionManager) IsBootstrapped() (bool, error)
func (*MockRegionManager) RemoveStore ¶
func (rm *MockRegionManager) RemoveStore(storeID uint64)
RemoveStore removes a Store from the cluster.
func (*MockRegionManager) ScanRegions ¶
func (rm *MockRegionManager) ScanRegions(startKey, endKey []byte, limit int) []*pdclient.Region
func (*MockRegionManager) Split ¶
func (rm *MockRegionManager) Split(regionID, newRegionID uint64, key []byte, peerIDs []uint64, leaderPeerID uint64)
Split splits a Region at the key (encoded) and creates new Region.
func (*MockRegionManager) SplitIndex ¶
func (rm *MockRegionManager) SplitIndex(tableID, indexID int64, count int)
SplitIndex evenly splits the data in index into count regions.
func (*MockRegionManager) SplitKeys ¶
func (rm *MockRegionManager) SplitKeys(start, end kv.Key, count int)
SplitKeys evenly splits the start, end key into "count" regions.
func (*MockRegionManager) SplitRaw ¶
func (rm *MockRegionManager) SplitRaw(regionID, newRegionID uint64, rawKey []byte, peerIDs []uint64, leaderPeerID uint64) *metapb.Region
SplitRaw splits a Region at the key (not encoded) and creates new Region.
func (*MockRegionManager) SplitRegion ¶
func (rm *MockRegionManager) SplitRegion(req *kvrpcpb.SplitRegionRequest) *kvrpcpb.SplitRegionResponse
func (*MockRegionManager) SplitTable ¶
func (rm *MockRegionManager) SplitTable(tableID int64, count int)
SplitTable evenly splits the data in table into count regions.
type RaftRegionManager ¶
type RaftRegionManager struct {
// contains filtered or unexported fields
}
func NewRaftRegionManager ¶
func NewRaftRegionManager(store *metapb.Store, router *raftstore.RaftstoreRouter, detector *DetectorServer) *RaftRegionManager
func (*RaftRegionManager) Close ¶
func (rm *RaftRegionManager) Close() error
func (*RaftRegionManager) GetRegionFromCtx ¶
func (rm *RaftRegionManager) GetRegionFromCtx(ctx *kvrpcpb.Context) (*regionCtx, *errorpb.Error)
func (*RaftRegionManager) GetStoreAddrByStoreId ¶
func (*RaftRegionManager) GetStoreIDByAddr ¶
func (*RaftRegionManager) GetStoreInfoFromCtx ¶
func (*RaftRegionManager) OnPeerApplySnap ¶
func (rm *RaftRegionManager) OnPeerApplySnap(ctx *raftstore.PeerEventContext, region *metapb.Region)
func (*RaftRegionManager) OnPeerCreate ¶
func (rm *RaftRegionManager) OnPeerCreate(ctx *raftstore.PeerEventContext, region *metapb.Region)
func (*RaftRegionManager) OnPeerDestroy ¶
func (rm *RaftRegionManager) OnPeerDestroy(ctx *raftstore.PeerEventContext)
func (*RaftRegionManager) OnRegionConfChange ¶
func (rm *RaftRegionManager) OnRegionConfChange(ctx *raftstore.PeerEventContext, epoch *metapb.RegionEpoch)
func (*RaftRegionManager) OnRoleChange ¶
func (rm *RaftRegionManager) OnRoleChange(regionId uint64, newState raft.StateType)
func (*RaftRegionManager) OnSplitRegion ¶
func (rm *RaftRegionManager) OnSplitRegion(derived *metapb.Region, regions []*metapb.Region, peers []*raftstore.PeerEventContext)
func (*RaftRegionManager) SplitRegion ¶
func (rm *RaftRegionManager) SplitRegion(req *kvrpcpb.SplitRegionRequest) *kvrpcpb.SplitRegionResponse
type RegionError ¶
type RegionError struct {
// contains filtered or unexported fields
}
func (*RegionError) Error ¶
func (regionError *RegionError) Error() string
type RegionManager ¶
type RegionManager interface { GetRegionFromCtx(ctx *kvrpcpb.Context) (*regionCtx, *errorpb.Error) GetStoreInfoFromCtx(ctx *kvrpcpb.Context) (string, uint64, *errorpb.Error) SplitRegion(req *kvrpcpb.SplitRegionRequest) *kvrpcpb.SplitRegionResponse GetStoreIDByAddr(addr string) (uint64, error) GetStoreAddrByStoreId(storeId uint64) (string, error) Close() error }
type RegionOptions ¶
type SafePoint ¶
type SafePoint struct {
// contains filtered or unexported fields
}
func (*SafePoint) CreateCompactionFilter ¶
func (sp *SafePoint) CreateCompactionFilter(targetLevel int, startKey, endKey []byte) badger.CompactionFilter
CreateCompactionFilter implements badger.CompactionFilterFactory function.
type SecondaryLocksStatus ¶
type SecondaryLocksStatus struct {
// contains filtered or unexported fields
}
SecondaryLocksStatus is the result of `CheckSecondaryLocksStatus` API.
type Server ¶
func NewServer ¶
func NewServer(rm RegionManager, store *MVCCStore, innerServer InnerServer) *Server
func (*Server) BatchCommands ¶
func (svr *Server) BatchCommands(stream tikvpb.Tikv_BatchCommandsServer) error
func (*Server) BatchCoprocessor ¶
func (svr *Server) BatchCoprocessor(req *coprocessor.BatchRequest, batchCopServer tikvpb.Tikv_BatchCoprocessorServer) error
func (*Server) CancelMPPTask ¶
func (svr *Server) CancelMPPTask(_ context.Context, _ *mpp.CancelTaskRequest) (*mpp.CancelTaskResponse, error)
func (*Server) CheckLeader ¶
func (svr *Server) CheckLeader(context.Context, *kvrpcpb.CheckLeaderRequest) (*kvrpcpb.CheckLeaderResponse, error)
func (*Server) CheckLockObserver ¶
func (svr *Server) CheckLockObserver(context.Context, *kvrpcpb.CheckLockObserverRequest) (*kvrpcpb.CheckLockObserverResponse, error)
func (*Server) Coprocessor ¶
func (svr *Server) Coprocessor(_ context.Context, req *coprocessor.Request) (*coprocessor.Response, error)
SQL push down commands.
func (*Server) CoprocessorStream ¶
func (svr *Server) CoprocessorStream(*coprocessor.Request, tikvpb.Tikv_CoprocessorStreamServer) error
func (*Server) CreateMPPTaskHandler ¶
func (svr *Server) CreateMPPTaskHandler(meta *mpp.TaskMeta, storeId uint64) (*cophandler.MPPTaskHandler, error)
func (*Server) Detect ¶
func (svr *Server) Detect(stream deadlockPb.Deadlock_DetectServer) error
Detect will handle detection rpc from other nodes
func (*Server) DispatchMPPTask ¶
func (svr *Server) DispatchMPPTask(_ context.Context, _ *mpp.DispatchTaskRequest) (*mpp.DispatchTaskResponse, error)
func (*Server) DispatchMPPTaskWithStoreId ¶
func (svr *Server) DispatchMPPTaskWithStoreId(ctx context.Context, req *mpp.DispatchTaskRequest, storeId uint64) (*mpp.DispatchTaskResponse, error)
func DispatchMPPTask do not have enough information(lack of target store id)
func (*Server) EstablishMPPConnection ¶
func (svr *Server) EstablishMPPConnection(*mpp.EstablishMPPConnectionRequest, tikvpb.Tikv_EstablishMPPConnectionServer) error
func (*Server) EstablishMPPConnectionWithStoreId ¶
func (svr *Server) EstablishMPPConnectionWithStoreId(req *mpp.EstablishMPPConnectionRequest, server tikvpb.Tikv_EstablishMPPConnectionServer, storeId uint64) error
func EstablishMPPConnection do not have enough information(lack of target store id)
func (*Server) GetMPPTaskHandler ¶
func (svr *Server) GetMPPTaskHandler(taskId int64, storeId uint64) (*cophandler.MPPTaskHandler, error)
func (*Server) GetStoreAddrByStoreId ¶
func (*Server) GetWaitForEntries ¶
func (svr *Server) GetWaitForEntries(ctx context.Context, req *deadlockPb.WaitForEntriesRequest) (*deadlockPb.WaitForEntriesResponse, error)
deadlock detection related services GetWaitForEntries tries to get the waitFor entries
func (*Server) KVPessimisticRollback ¶
func (svr *Server) KVPessimisticRollback(ctx context.Context, req *kvrpcpb.PessimisticRollbackRequest) (*kvrpcpb.PessimisticRollbackResponse, error)
func (*Server) KvBatchGet ¶
func (svr *Server) KvBatchGet(ctx context.Context, req *kvrpcpb.BatchGetRequest) (*kvrpcpb.BatchGetResponse, error)
func (*Server) KvBatchRollback ¶
func (svr *Server) KvBatchRollback(ctx context.Context, req *kvrpcpb.BatchRollbackRequest) (*kvrpcpb.BatchRollbackResponse, error)
func (*Server) KvCheckSecondaryLocks ¶
func (svr *Server) KvCheckSecondaryLocks(ctx context.Context, req *kvrpcpb.CheckSecondaryLocksRequest) (*kvrpcpb.CheckSecondaryLocksResponse, error)
func (*Server) KvCheckTxnStatus ¶
func (svr *Server) KvCheckTxnStatus(ctx context.Context, req *kvrpcpb.CheckTxnStatusRequest) (*kvrpcpb.CheckTxnStatusResponse, error)
func (*Server) KvCleanup ¶
func (svr *Server) KvCleanup(ctx context.Context, req *kvrpcpb.CleanupRequest) (*kvrpcpb.CleanupResponse, error)
func (*Server) KvCommit ¶
func (svr *Server) KvCommit(ctx context.Context, req *kvrpcpb.CommitRequest) (*kvrpcpb.CommitResponse, error)
func (*Server) KvDeleteRange ¶
func (svr *Server) KvDeleteRange(ctx context.Context, req *kvrpcpb.DeleteRangeRequest) (*kvrpcpb.DeleteRangeResponse, error)
func (*Server) KvGet ¶
func (svr *Server) KvGet(ctx context.Context, req *kvrpcpb.GetRequest) (*kvrpcpb.GetResponse, error)
func (*Server) KvImport ¶
func (svr *Server) KvImport(context.Context, *kvrpcpb.ImportRequest) (*kvrpcpb.ImportResponse, error)
func (*Server) KvPessimisticLock ¶
func (svr *Server) KvPessimisticLock(ctx context.Context, req *kvrpcpb.PessimisticLockRequest) (*kvrpcpb.PessimisticLockResponse, error)
func (*Server) KvPrewrite ¶
func (svr *Server) KvPrewrite(ctx context.Context, req *kvrpcpb.PrewriteRequest) (*kvrpcpb.PrewriteResponse, error)
func (*Server) KvResolveLock ¶
func (svr *Server) KvResolveLock(ctx context.Context, req *kvrpcpb.ResolveLockRequest) (*kvrpcpb.ResolveLockResponse, error)
func (*Server) KvScan ¶
func (svr *Server) KvScan(ctx context.Context, req *kvrpcpb.ScanRequest) (*kvrpcpb.ScanResponse, error)
func (*Server) KvScanLock ¶
func (svr *Server) KvScanLock(ctx context.Context, req *kvrpcpb.ScanLockRequest) (*kvrpcpb.ScanLockResponse, error)
func (*Server) KvTxnHeartBeat ¶
func (svr *Server) KvTxnHeartBeat(ctx context.Context, req *kvrpcpb.TxnHeartBeatRequest) (*kvrpcpb.TxnHeartBeatResponse, error)
func (*Server) MvccGetByKey ¶
func (svr *Server) MvccGetByKey(ctx context.Context, req *kvrpcpb.MvccGetByKeyRequest) (*kvrpcpb.MvccGetByKeyResponse, error)
transaction debugger commands.
func (*Server) MvccGetByStartTs ¶
func (svr *Server) MvccGetByStartTs(ctx context.Context, req *kvrpcpb.MvccGetByStartTsRequest) (*kvrpcpb.MvccGetByStartTsResponse, error)
func (*Server) PhysicalScanLock ¶
func (svr *Server) PhysicalScanLock(ctx context.Context, req *kvrpcpb.PhysicalScanLockRequest) (*kvrpcpb.PhysicalScanLockResponse, error)
func (*Server) Raft ¶
func (svr *Server) Raft(stream tikvpb.Tikv_RaftServer) error
Raft commands (tikv <-> tikv).
func (*Server) RawBatchDelete ¶
func (svr *Server) RawBatchDelete(context.Context, *kvrpcpb.RawBatchDeleteRequest) (*kvrpcpb.RawBatchDeleteResponse, error)
func (*Server) RawBatchGet ¶
func (svr *Server) RawBatchGet(context.Context, *kvrpcpb.RawBatchGetRequest) (*kvrpcpb.RawBatchGetResponse, error)
func (*Server) RawBatchPut ¶
func (svr *Server) RawBatchPut(context.Context, *kvrpcpb.RawBatchPutRequest) (*kvrpcpb.RawBatchPutResponse, error)
func (*Server) RawBatchScan ¶
func (svr *Server) RawBatchScan(context.Context, *kvrpcpb.RawBatchScanRequest) (*kvrpcpb.RawBatchScanResponse, error)
func (*Server) RawDelete ¶
func (svr *Server) RawDelete(context.Context, *kvrpcpb.RawDeleteRequest) (*kvrpcpb.RawDeleteResponse, error)
func (*Server) RawDeleteRange ¶
func (svr *Server) RawDeleteRange(context.Context, *kvrpcpb.RawDeleteRangeRequest) (*kvrpcpb.RawDeleteRangeResponse, error)
func (*Server) RawGet ¶
func (svr *Server) RawGet(context.Context, *kvrpcpb.RawGetRequest) (*kvrpcpb.RawGetResponse, error)
RawKV commands.
func (*Server) RawGetKeyTTL ¶
func (svr *Server) RawGetKeyTTL(ctx context.Context, req *kvrpcpb.RawGetKeyTTLRequest) (*kvrpcpb.RawGetKeyTTLResponse, error)
func (*Server) RawPut ¶
func (svr *Server) RawPut(context.Context, *kvrpcpb.RawPutRequest) (*kvrpcpb.RawPutResponse, error)
func (*Server) RawScan ¶
func (svr *Server) RawScan(context.Context, *kvrpcpb.RawScanRequest) (*kvrpcpb.RawScanResponse, error)
func (*Server) ReadIndex ¶
func (svr *Server) ReadIndex(context.Context, *kvrpcpb.ReadIndexRequest) (*kvrpcpb.ReadIndexResponse, error)
func (*Server) RegisterLockObserver ¶
func (svr *Server) RegisterLockObserver(context.Context, *kvrpcpb.RegisterLockObserverRequest) (*kvrpcpb.RegisterLockObserverResponse, error)
func (*Server) RemoveLockObserver ¶
func (svr *Server) RemoveLockObserver(context.Context, *kvrpcpb.RemoveLockObserverRequest) (*kvrpcpb.RemoveLockObserverResponse, error)
func (*Server) RemoveMPPTaskHandler ¶
func (*Server) SplitRegion ¶
func (svr *Server) SplitRegion(ctx context.Context, req *kvrpcpb.SplitRegionRequest) (*kvrpcpb.SplitRegionResponse, error)
Region commands.
func (*Server) UnsafeDestroyRange ¶
func (svr *Server) UnsafeDestroyRange(ctx context.Context, req *kvrpcpb.UnsafeDestroyRangeRequest) (*kvrpcpb.UnsafeDestroyRangeResponse, error)
func (*Server) VerBatchGet ¶
func (svr *Server) VerBatchGet(context.Context, *kvrpcpb.VerBatchGetRequest) (*kvrpcpb.VerBatchGetResponse, error)
func (*Server) VerBatchMut ¶
func (svr *Server) VerBatchMut(context.Context, *kvrpcpb.VerBatchMutRequest) (*kvrpcpb.VerBatchMutResponse, error)
func (*Server) VerDeleteRange ¶
func (svr *Server) VerDeleteRange(context.Context, *kvrpcpb.VerDeleteRangeRequest) (*kvrpcpb.VerDeleteRangeResponse, error)
func (*Server) VerGet ¶
func (svr *Server) VerGet(context.Context, *kvrpcpb.VerGetRequest) (*kvrpcpb.VerGetResponse, error)
func (*Server) VerMut ¶
func (svr *Server) VerMut(context.Context, *kvrpcpb.VerMutRequest) (*kvrpcpb.VerMutResponse, error)
func (*Server) VerScan ¶
func (svr *Server) VerScan(context.Context, *kvrpcpb.VerScanRequest) (*kvrpcpb.VerScanResponse, error)
type StandAloneRegionManager ¶
type StandAloneRegionManager struct {
// contains filtered or unexported fields
}
func NewStandAloneRegionManager ¶
func NewStandAloneRegionManager(bundle *mvcc.DBBundle, opts RegionOptions, pdc pd.Client) *StandAloneRegionManager
func (*StandAloneRegionManager) Close ¶
func (rm *StandAloneRegionManager) Close() error
func (*StandAloneRegionManager) GetRegionFromCtx ¶
func (*StandAloneRegionManager) GetStoreAddrByStoreId ¶
func (*StandAloneRegionManager) GetStoreIDByAddr ¶
func (*StandAloneRegionManager) GetStoreInfoFromCtx ¶
func (*StandAloneRegionManager) SplitRegion ¶
func (rm *StandAloneRegionManager) SplitRegion(req *kvrpcpb.SplitRegionRequest) *kvrpcpb.SplitRegionResponse
type StandAlongInnerServer ¶
type StandAlongInnerServer struct {
// contains filtered or unexported fields
}
func NewStandAlongInnerServer ¶
func NewStandAlongInnerServer(bundle *mvcc.DBBundle) *StandAlongInnerServer
func (*StandAlongInnerServer) BatchRaft ¶
func (is *StandAlongInnerServer) BatchRaft(stream tikvpb.Tikv_BatchRaftServer) error
func (*StandAlongInnerServer) Raft ¶
func (is *StandAlongInnerServer) Raft(stream tikvpb.Tikv_RaftServer) error
func (*StandAlongInnerServer) Setup ¶
func (is *StandAlongInnerServer) Setup(pdClient pd.Client)
func (*StandAlongInnerServer) Snapshot ¶
func (is *StandAlongInnerServer) Snapshot(stream tikvpb.Tikv_SnapshotServer) error
func (*StandAlongInnerServer) Start ¶
func (is *StandAlongInnerServer) Start(pdClient pd.Client) error
func (*StandAlongInnerServer) Stop ¶
func (is *StandAlongInnerServer) Stop() error