Documentation
¶
Index ¶
- Constants
- Variables
- func AwsErrToReply(err error) int32
- func CalcRequiredPageBufferSize(offset int64, dataLen int64) int64
- func CalculateBufferLengthForDownload(h MetaRWHandler, offset int64) int
- func CollectLRUChunks(dirtyMgr *DirtyMgr, raft *RaftInstance, reclaimDiskBytes int64) (keys []uint64, offsets []int64)
- func CollectLRUDirtyKeys(dirtyMgr *DirtyMgr, raft *RaftInstance, reclaimDiskBytes int64) (keys map[InodeKeyType]bool)
- func ErrnoToReply(err error) int32
- func GetAddrInet4FromString(headWorkerAddr string, headWorkerPort int) (common.NodeAddrInet4, error)
- func GetBufCheckSum(buf []byte) []byte
- func GetGroupForChunk(ring *hashring.HashRing, inodeKey InodeKeyType, offset int64, chunkSize int64) (groupId string, ok bool)
- func GetGroupForMeta(ring *hashring.HashRing, inodeKey InodeKeyType) (groupId string, ok bool)
- func GetRandF(r rand.Source) float64
- func GetServerConfig(args *common.ObjcacheCmdlineArgs, timeout time.Duration) (common.ObjcacheConfig, error)
- func HttpErrToReply(status int) int32
- func InitAccessLinkHead()
- func InitLog(args *common.ObjcacheCmdlineArgs) *common.LogHandle
- func InitMemoryPool()
- func MyHashFunc(in []byte) hashring.HashKey
- func MyHashFunc64(in []byte) hashring.HashKey
- func MyHashFunc64V2(in []byte) hashring.HashKey
- func MyHashFuncV2(in []byte) hashring.HashKey
- func NewAppendCommitUpdateChunkMsg(meta *WorkingMeta, chunks map[int64]*WorkingChunk, isDelete bool) *common.AppendCommitUpdateChunksMsg
- func NewNodeMsgFromAddr(addr common.NodeAddrInet4) *common.NodeMsg
- func NewSaFromApiNodeMsg(msg *api.ApiNodeMsg) (ret common.NodeAddrInet4)
- func NewSaFromNodeMsg(msg *common.NodeMsg) (ret common.NodeAddrInet4)
- func NewUpdateParentRetFromMsg(msg *common.UpdateParentRetMsg) (UpdateParentRet, RaftBasicReply)
- func PString(v string) *string
- func PTime(v time.Time) *time.Time
- func PrepareCommitUpdateChunkBody(inodeMgr *InodeMgr, offStags map[int64][]*common.StagingChunkMsg, ...) (chunks map[int64]*WorkingChunk, unlocks []func())
- func ProfilerThread(blockProfileRate int, mutexProfileRate int, listenIp string, profilePort int)
- func ReadDataToBuffer(fd int, msg *RpcMsg, r *ReadRpcMsgState, data []byte)
- func ReadDataToFd(fd int, msg *RpcMsg, r *ReadRpcMsgState, toFd int, pipeFds [2]int)
- func ReadDataToRaftLog(fd int, msg *RpcMsg, r *ReadRpcMsgState, extLogger *OnDiskLogger, ...)
- func ReadRpcMsg(fd int, msg *RpcMsg, r *ReadRpcMsgState)
- func ReplyToFuseErr(reply int32) error
- func ReturnPageBuffer(buf *PageBuffer)
- func SignV2(req *request.Request)
- type AbortParticipantOp
- type AbortTxCommand
- type AddInodeFileMapCommand
- type AddServerCommand
- type AppendEntryCommand
- func (l *AppendEntryCommand) AppendToRpcMsg(d *RpcMsg) (newOptHeaderLength uint16, newTotalExtLogSize uint32)
- func (l *AppendEntryCommand) AsRaftCommand() (RaftCommand, bool)
- func (l *AppendEntryCommand) GetChecksum() []byte
- func (l *AppendEntryCommand) GetEntryLength() uint8
- func (l *AppendEntryCommand) GetExtCmdId() uint16
- func (l *AppendEntryCommand) GetExtPayload() []byte
- func (l *AppendEntryCommand) GetTerm() uint32
- type BeginPersistCommand
- func (c BeginPersistCommand) Commit(n *NodeServer)
- func (c BeginPersistCommand) GetExtCmdId() uint16
- func (c BeginPersistCommand) GetTxId() TxId
- func (c BeginPersistCommand) IsSingleShot() bool
- func (c BeginPersistCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- func (c BeginPersistCommand) RemoteCommit(*RaftGroupMgr) []ParticipantOp
- type BlobItemOutput
- type BlobPrefixOutput
- type BucketCredential
- type BucketCredentials
- type BucketSpec
- type BufferedDiskPageReader
- type Capabilities
- type Chunk
- func (c *Chunk) AddWorkingChunk(inodeMgr *InodeMgr, working *WorkingChunk, prev *WorkingChunk)
- func (c *Chunk) DeleteFromLRUListNoLock()
- func (c *Chunk) Drop(inodeMgr *InodeMgr, raft *RaftInstance)
- func (c *Chunk) GetLogId() LogIdType
- func (c *Chunk) GetWorkingChunk(ver uint32, updateLRU bool) (*WorkingChunk, error)
- func (c *Chunk) NewWorkingChunk(chunkVer uint32) *WorkingChunk
- func (c *Chunk) UpdateLRUList()
- type ChunkReader
- func (r *ChunkReader) Close() (err error)
- func (r *ChunkReader) GetBufferZeroCopy(size int) (bufs []SlicedPageBuffer, count int, err error)
- func (r *ChunkReader) GetLen() (int64, error)
- func (r *ChunkReader) HasLen() (int, bool)
- func (r *ChunkReader) IsSeeker() bool
- func (r *ChunkReader) Read(p []byte) (int, error)
- func (r *ChunkReader) Seek(offset int64, whence int) (int64, error)
- func (r *ChunkReader) WriteTo(w io.Writer) (n int64, err error)
- type CommitAbortRpcCaller
- func (c CommitAbortRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CommitAbortRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CommitAbortRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CommitAbortRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
- func (c CommitAbortRpcCaller) TryNext(n *NodeServer, i int) bool
- type CommitChunkCommand
- type CommitChunkRpcCaller
- func (c CommitChunkRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CommitChunkRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CommitChunkRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CommitChunkRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
- func (c CommitChunkRpcCaller) TryNext(n *NodeServer, i int) bool
- type CommitCommand
- type CommitDeleteChunkOp
- func (o CommitDeleteChunkOp) GetCaller(n *NodeServer) RpcCaller
- func (o CommitDeleteChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CommitDeleteChunkOp) GetTxId() TxId
- func (o CommitDeleteChunkOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
- type CommitExpandChunkOp
- func (o CommitExpandChunkOp) GetCaller(n *NodeServer) RpcCaller
- func (o CommitExpandChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CommitExpandChunkOp) GetTxId() TxId
- func (o CommitExpandChunkOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
- type CommitParticipantOp
- func (o CommitParticipantOp) GetCaller(n *NodeServer) RpcCaller
- func (o CommitParticipantOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CommitParticipantOp) GetTxId() TxId
- func (o CommitParticipantOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
- type CommitPersistChunkOp
- func (o CommitPersistChunkOp) GetCaller(n *NodeServer) RpcCaller
- func (o CommitPersistChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CommitPersistChunkOp) GetTxId() TxId
- func (o CommitPersistChunkOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
- type CommitUpdateChunkOp
- func (o CommitUpdateChunkOp) GetCaller(n *NodeServer) RpcCaller
- func (o CommitUpdateChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CommitUpdateChunkOp) GetTxId() TxId
- func (o CommitUpdateChunkOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
- type CompactLogCoordinatorCommand
- func (c CompactLogCoordinatorCommand) Commit(n *NodeServer)
- func (c CompactLogCoordinatorCommand) GetExtCmdId() uint16
- func (c CompactLogCoordinatorCommand) GetTxId() TxId
- func (c CompactLogCoordinatorCommand) IsSingleShot() bool
- func (c CompactLogCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
- func (c CompactLogCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
- type CoordinatorCommand
- type CoordinatorCompactLogOp
- type CoordinatorCreateObjectOp
- func (o CoordinatorCreateObjectOp) GetCaller(n *NodeServer) RpcCaller
- func (o CoordinatorCreateObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CoordinatorCreateObjectOp) GetTxId() TxId
- func (o CoordinatorCreateObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
- type CoordinatorDeleteObjectOp
- func (o CoordinatorDeleteObjectOp) GetCaller(n *NodeServer) RpcCaller
- func (o CoordinatorDeleteObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CoordinatorDeleteObjectOp) GetTxId() TxId
- func (o CoordinatorDeleteObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
- type CoordinatorDeletePersistOp
- func (o CoordinatorDeletePersistOp) GetCaller(n *NodeServer) RpcCaller
- func (o CoordinatorDeletePersistOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CoordinatorDeletePersistOp) GetTxId() TxId
- func (o CoordinatorDeletePersistOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
- type CoordinatorFlushObjectOp
- func (o CoordinatorFlushObjectOp) GetCaller(n *NodeServer) RpcCaller
- func (o CoordinatorFlushObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CoordinatorFlushObjectOp) GetTxId() TxId
- func (o CoordinatorFlushObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
- type CoordinatorHardLinkOp
- type CoordinatorId
- type CoordinatorOpBase
- func NewCoordinatorCreateObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorDeleteObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorDeletePersistOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorFlushObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorHardLinkOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorPersistOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorRenameObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorTruncateObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- func NewCoordinatorUpdateNodeListOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
- type CoordinatorPersistOp
- type CoordinatorRenameObjectOp
- func (o CoordinatorRenameObjectOp) CheckError(unlink UpdateParentRet, link UpdateParentRet) int32
- func (o CoordinatorRenameObjectOp) GetCaller(n *NodeServer) RpcCaller
- func (o CoordinatorRenameObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CoordinatorRenameObjectOp) GetTxId() TxId
- func (o CoordinatorRenameObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
- type CoordinatorRet
- type CoordinatorRpcCaller
- func (c CoordinatorRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CoordinatorRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CoordinatorRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c CoordinatorRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
- func (c CoordinatorRpcCaller) TryNext(n *NodeServer, i int) bool
- type CoordinatorTruncateObjectOp
- func (o CoordinatorTruncateObjectOp) GetCaller(n *NodeServer) RpcCaller
- func (o CoordinatorTruncateObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
- func (o CoordinatorTruncateObjectOp) GetTxId() TxId
- func (o CoordinatorTruncateObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
- type CoordinatorUpdateNodeListOp
- func (o CoordinatorUpdateNodeListOp) GetCaller(n *NodeServer) RpcCaller
- func (o CoordinatorUpdateNodeListOp) GetLeader(_ *NodeServer, _ *RaftNodeList) (RaftNode, bool)
- func (o CoordinatorUpdateNodeListOp) GetTxId() TxId
- func (o CoordinatorUpdateNodeListOp) RetToMsg(_ interface{}, r RaftBasicReply) proto.Message
- type CopyBlobInput
- type CopyBlobOutput
- type CreateChildMetaOp
- type CreateChunkCommand
- type CreateCoordinatorCommand
- func (c CreateCoordinatorCommand) Commit(n *NodeServer)
- func (c CreateCoordinatorCommand) GetExtCmdId() uint16
- func (c CreateCoordinatorCommand) GetTxId() TxId
- func (c CreateCoordinatorCommand) IsSingleShot() bool
- func (c CreateCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- func (c CreateCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
- type CreateMetaCommand
- type CreateMetaOp
- type Delegator
- type DeleteBlobInput
- type DeleteBlobOutput
- type DeleteBlobsInput
- type DeleteBlobsOutput
- type DeleteCoordinatorCommand
- func (c DeleteCoordinatorCommand) Commit(n *NodeServer)
- func (c DeleteCoordinatorCommand) GetExtCmdId() uint16
- func (c DeleteCoordinatorCommand) GetTxId() TxId
- func (c DeleteCoordinatorCommand) IsSingleShot() bool
- func (c DeleteCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- func (c DeleteCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
- type DeleteInodeFileMapCommand
- type DeleteMetaCommand
- type DeleteMetaOp
- type DeletePersistCoordinatorCommand
- func (c DeletePersistCoordinatorCommand) Commit(n *NodeServer)
- func (c DeletePersistCoordinatorCommand) GetExtCmdId() uint16
- func (c DeletePersistCoordinatorCommand) GetTxId() TxId
- func (c DeletePersistCoordinatorCommand) IsSingleShot() bool
- func (c DeletePersistCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- func (c DeletePersistCoordinatorCommand) RemoteCommit(*RaftGroupMgr) []ParticipantOp
- type DeletedFileInfo
- type DirtyChunkInfo
- type DirtyMetaInfo
- type DirtyMgr
- func (d *DirtyMgr) AddChildMetaNoLock(meta *WorkingMeta, name string)
- func (d *DirtyMgr) AddChunkNoLock(inodeKey InodeKeyType, chunkSize int64, chunkVer uint32, offset int64, ...)
- func (d *DirtyMgr) AddDeleteKeyNoLock(key string, meta *WorkingMeta)
- func (d *DirtyMgr) AddMetaNoLock(meta *WorkingMeta)
- func (d *DirtyMgr) AddMigratedAddChunk(migrationId MigrationId, chunk *common.AppendCommitUpdateChunksMsg)
- func (d *DirtyMgr) AddMigratedAddMetas(s *Snapshot)
- func (d *DirtyMgr) AddMigratedRemoveChunk(migrationId MigrationId, chunks []*common.ChunkRemoveDirtyMsg)
- func (d *DirtyMgr) AddMigratedRemoveMetas(migrationId MigrationId, inodeKeys []uint64, dirKeys []uint64)
- func (d *DirtyMgr) AppendForgetAllDirtyLog(raft *RaftInstance) int32
- func (d *DirtyMgr) AppendRemoveNonDirtyChunksLog(raft *RaftInstance, fps []uint64) int32
- func (d *DirtyMgr) ApplyAsRemoveNonDirtyChunks(pm proto.Message) int32
- func (d *DirtyMgr) CheckReset() (ok bool)
- func (d *DirtyMgr) CommitMigratedDataLocal(inodeMgr *InodeMgr, migrationId MigrationId)
- func (d *DirtyMgr) CopyAllExpiredPrimaryDeletedDirtyMeta() map[string]InodeKeyType
- func (d *DirtyMgr) CopyAllExpiredPrimaryDirtyMeta() []InodeKeyType
- func (d *DirtyMgr) CopyAllPrimaryDeletedKeys() map[string]InodeKeyType
- func (d *DirtyMgr) CopyAllPrimaryDirtyMeta() []InodeKeyType
- func (d *DirtyMgr) DropMigratingData(migrationId MigrationId)
- func (d *DirtyMgr) ForgetAllDirty()
- func (d *DirtyMgr) GetAllDirtyMeta() []*common.DirtyMetaInfoMsg
- func (d *DirtyMgr) GetDeleteKey(key string) (inodeKey InodeKeyType, ok bool)
- func (d *DirtyMgr) GetDirInodesForNodeJoin(dirInodes []*common.InodeTreeMsg, migrationId MigrationId, ...) []*common.InodeTreeMsg
- func (d *DirtyMgr) GetDirMetaForNodeLeave(keys []*common.InodeTreeMsg, nodeList *RaftNodeList) map[string][]*common.InodeTreeMsg
- func (d *DirtyMgr) GetDirtyChunkAll() map[InodeKeyType]DirtyChunkInfo
- func (d *DirtyMgr) GetDirtyChunkForNodeJoin(migrationId MigrationId, nodeList *RaftNodeList, newRing *hashring.HashRing, ...) map[InodeKeyType]DirtyChunkInfo
- func (d *DirtyMgr) GetDirtyMetaForNodeLeave(nodeList *RaftNodeList) (map[InodeKeyType]bool, map[string]map[InodeKeyType]bool)
- func (d *DirtyMgr) GetDirtyMetasForNodeJoin(migrationId MigrationId, nodeList *RaftNodeList, newRing *hashring.HashRing, ...) map[InodeKeyType]bool
- func (d *DirtyMgr) GetLikelyDirtyChunkInodeIds() []InodeKeyType
- func (d *DirtyMgr) IsDirtyChunk(chunk *Chunk) bool
- func (d *DirtyMgr) IsDirtyMeta(inodeKey InodeKeyType) (ok bool)
- func (d *DirtyMgr) RemoveChildMetaNoLock(meta *WorkingMeta, name string)
- func (d *DirtyMgr) RemoveChunkNoLock(inodeKey InodeKeyType, offset int64, chunkVer uint32)
- func (d *DirtyMgr) RemoveChunkNoLockAllOffsets(inodeId InodeKeyType)
- func (d *DirtyMgr) RemoveDeleteKeyNoLock(key string) (InodeKeyType, bool)
- func (d *DirtyMgr) RemoveMetaNoLock(inodeId InodeKeyType)
- func (d *DirtyMgr) RemoveMetaNoLockIfLatest(inodeId InodeKeyType, version uint32) bool
- func (d *DirtyMgr) RemoveNonDirtyChunks(fps []uint64)
- type DiskWriteVector
- type DropLRUChunksCommand
- type EpollHandler
- type EpollReader
- func (r *EpollReader) AddFd(fd int, sa common.NodeAddrInet4) (err error)
- func (r *EpollReader) CheckReset() (ok bool)
- func (r *EpollReader) Close() error
- func (r *EpollReader) RaftRpcThread(maxEvents int, n *NodeServer, pipeFds [2]int, raft *RaftInstance)
- func (r *EpollReader) RemoveFd(fd int) (err error)
- type ExpireDeleteInfo
- type ExpireInfo
- type ExtLogCommand
- type ExtLogCommandImpl
- func LoadExtBuf(extLogger *OnDiskLogger, l *AppendEntryCommand) (extCmd ExtLogCommandImpl, err error)
- func NewAbortTxCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewAddInodeFileMapCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewBeginPersistCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewCommitChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewCompactLogCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewCreateChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewCreateCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewCreateMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewDeleteCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewDeleteInodeFileMapCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewDeleteMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewDeletePersistCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewDropLRUChunksCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewFlushCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewForgetAllDirtyLogCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewHardLinkCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewInitNodeListCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewPersistChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewPersistCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewRecordMigratedAddChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewRecordMigratedAddMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewRecordMigratedRemoveChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewRecordMigratedRemoveMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewRemoveNonDirtyChunksCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewRenameCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewTruncateCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewUpdateChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewUpdateMetaAttrCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewUpdateMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewUpdateMetaKeyCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewUpdateNodeListCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewUpdateNodeListCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
- func NewUpdateParentMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
- type FileHandle
- func (i *FileHandle) Flush(n *NodeServer) (meta *WorkingMeta, errno error)
- func (i *FileHandle) GetLength() int64
- func (i *FileHandle) Read(offset int64, size int64, n *NodeServer, op interface{}) (data [][]byte, count int, errno error)
- func (i *FileHandle) ReadNoCache(offset int64, size int64, n *NodeServer, op interface{}) (data [][]byte, count int, errno error)
- func (i *FileHandle) ReleaseFlyingBuffer(op interface{})
- func (i *FileHandle) SetMeta(meta *WorkingMeta)
- func (i *FileHandle) SetModeMTime(mode *os.FileMode, mTime *time.Time)
- func (i *FileHandle) Write(offset int64, data []byte, n *NodeServer) (meta *WorkingMeta, errno error)
- type FillNodeListOp
- type FillingInfo
- type FillingKey
- type FillingKey2
- type FlushCoordinatorCommand
- func (c FlushCoordinatorCommand) Commit(n *NodeServer)
- func (c FlushCoordinatorCommand) GetExtCmdId() uint16
- func (c FlushCoordinatorCommand) GetTxId() TxId
- func (c FlushCoordinatorCommand) IsSingleShot() bool
- func (c FlushCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
- func (c FlushCoordinatorCommand) RemoteCommit(raftGroup *RaftGroupMgr) []ParticipantOp
- type ForgetAllDirtyLogCommand
- type GCS3
- func (s *GCS3) Delegate() interface{}
- func (s *GCS3) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (s *GCS3) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (s *GCS3) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (s *GCS3) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- type GCSMultipartBlobCommitInput
- type GetApiIpAndPortOp
- type GetBlobInput
- type GetBlobOutput
- type GetMetaOp
- type GetWorkingMetaRet
- type HardLinkCoordinatorCommand
- func (c HardLinkCoordinatorCommand) Commit(n *NodeServer)
- func (c HardLinkCoordinatorCommand) GetExtCmdId() uint16
- func (c HardLinkCoordinatorCommand) GetTxId() TxId
- func (c HardLinkCoordinatorCommand) IsSingleShot() bool
- func (c HardLinkCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
- func (c HardLinkCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
- type HeadBlobInput
- type HeadBlobOutput
- type InitNodeListCommand
- type Inode
- type InodeKeyType
- type InodeMgr
- func (n *InodeMgr) AppendStagingChunkBuffer(inodeKey InodeKeyType, offset int64, chunkSize int64, buf []byte) (logOffset int64, reply int32)
- func (n *InodeMgr) AppendStagingChunkLog(inodeKey InodeKeyType, offset int64, logId LogIdType, logOffset int64, ...) (reply int32)
- func (n *InodeMgr) CheckReset() (ok bool)
- func (n *InodeMgr) Clean(dirtyMgr *DirtyMgr) int32
- func (n *InodeMgr) CommitCreateChunk(inodeKey InodeKeyType, offset int64, version uint32, logOffset int64, ...)
- func (n *InodeMgr) CommitCreateMeta(working *WorkingMeta, parent InodeKeyType, newKey string, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitDeleteChunk(inodeKey InodeKeyType, offset int64, chunkSize int64, chunkVer uint32, ...)
- func (n *InodeMgr) CommitDeleteInodeMap(inodeKeys []uint64, keys []string)
- func (n *InodeMgr) CommitDeletePersistMeta(key string, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitPersistChunk(inodeKey InodeKeyType, offsets []int64, cVers []uint32, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitPersistMeta(inodeKey InodeKeyType, newFetchKey string, version uint32, ts int64, ...)
- func (n *InodeMgr) CommitSetMetaAndInodeFile(working *WorkingMeta, children map[string]InodeKeyType, key string)
- func (n *InodeMgr) CommitUpdateChunk(inodeKey InodeKeyType, offset int64, chunkSize int64, chunkVer uint32, ...)
- func (n *InodeMgr) CommitUpdateInodeToFile(working *WorkingMeta, children map[string]InodeKeyType, removedKey string, ...) *WorkingMeta
- func (n *InodeMgr) CommitUpdateMeta(working *WorkingMeta, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitUpdateMetaAttr(inodeKey InodeKeyType, mode uint32, ts int64)
- func (n *InodeMgr) CommitUpdateParentMeta(info *UpdateParentInfo, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CreateInodeId() (InodeKeyType, error)
- func (n *InodeMgr) DeleteInode(inodeKeys []uint64)
- func (n *InodeMgr) DropLRUChunk(keys []uint64, offsets []int64)
- func (n *InodeMgr) GetAllChunks(chunks map[InodeKeyType]DirtyChunkInfo) ([]*common.AppendCommitUpdateChunksMsg, error)
- func (n *InodeMgr) GetAllDirInodes() []*common.InodeTreeMsg
- func (n *InodeMgr) GetAllDirectoryMetaAsUint64() []uint64
- func (n *InodeMgr) GetAllMeta() ([]*common.CopiedMetaMsg, []*common.InodeToFileMsg)
- func (n *InodeMgr) GetAllMetaIn(inodeKeys []uint64) ([]*common.CopiedMetaMsg, []*common.InodeToFileMsg)
- func (n *InodeMgr) GetChunk(inodeKey InodeKeyType, offset int64, chunkSize int64) *Chunk
- func (n *InodeMgr) GetInode(inodeKey InodeKeyType) *Inode
- func (n *InodeMgr) GetMetaForNodeJoin(migrationId MigrationId, selfGroup string, joinGroup string, ...) *Snapshot
- func (n *InodeMgr) GetMetaForNodeLeave(migrationId MigrationId, nodeList *RaftNodeList, ...) map[string]*Snapshot
- func (n *InodeMgr) GetOrFetchWorkingMeta(inodeKey InodeKeyType, key string, chunkSize int64, expireMs int32, ...) (*WorkingMeta, map[string]InodeKeyType, int32)
- func (n *InodeMgr) MpuAbort(key string, uploadId string) (reply int32)
- func (n *InodeMgr) MpuAdd(metaKey string, meta *WorkingMeta, offset int64, uploadId string, priority int, ...) (out MpuAddOut, unlock func(*NodeServer), reply int32)
- func (n *InodeMgr) MpuBegin(key string) (uploadId string, reply int32)
- func (n *InodeMgr) MpuCommit(key string, uploadId string, eTags []string) (ts int64, reply int32)
- func (n *InodeMgr) NewWorkingMetaForRoot() (*WorkingMeta, map[string]InodeKeyType)
- func (n *InodeMgr) PersistDeleteObject(key string, _ int) (reply int32)
- func (n *InodeMgr) PrefetchChunkThread(h MetaRWHandler, offset int64)
- func (n *InodeMgr) PrepareCreateMeta(inodeKey InodeKeyType, chunkSize int64, expireMs int32, mode uint32) (*WorkingMeta, func(*NodeServer), int32)
- func (n *InodeMgr) PreparePersistChunk(meta *WorkingMeta, offset int64) (chunk *Chunk, working *WorkingChunk, reply int32)
- func (n *InodeMgr) PreparePersistDeleteMeta(key string, dirtyMgr *DirtyMgr) int32
- func (n *InodeMgr) PreparePersistMeta(inodeKey InodeKeyType, dirtyMgr *DirtyMgr) (*Inode, []string, *WorkingMeta, int32)
- func (n *InodeMgr) PrepareUpdateChunk(newMeta *WorkingMeta, alignedOffset int64) (chunk *Chunk, working *WorkingChunk)
- func (n *InodeMgr) PrepareUpdateMeta(inodeKey InodeKeyType, delete bool) (*WorkingMeta, func(*NodeServer), int32)
- func (n *InodeMgr) PrepareUpdateMetaKey(inodeKey InodeKeyType, oldKey string, parent InodeKeyType, chunkSize int64, ...) (*WorkingMeta, map[string]InodeKeyType, func(*NodeServer), int32)
- func (n *InodeMgr) PrepareUpdateParent(inodeKey InodeKeyType, delete bool) (*WorkingMeta, map[string]InodeKeyType, func(*NodeServer), int32)
- func (n *InodeMgr) PutDirObject(inode *Inode, meta *WorkingMeta, _ int) (ts int64, reply int32)
- func (n *InodeMgr) PutEmptyObject(metaKeys []string, meta *WorkingMeta, _ int) (ts int64, reply int32)
- func (n *InodeMgr) PutObject(tm *TxIdMgr, metaKeys []string, meta *WorkingMeta, priority int, ...) (ts int64, chunks []*common.PersistedChunkInfoMsg, reply int32)
- func (n *InodeMgr) QuickCommitDeleteChunk(localOffsets map[int64]int64, meta *WorkingMeta, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) QuickCommitExpandChunk(localOffsets map[int64]int64, meta *WorkingMeta, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) QuickCommitUpdateChunk(meta *WorkingMeta, selfGroup string, ucs []*common.UpdateChunkRecordMsg, ...)
- func (n *InodeMgr) QuickPrepareChunk(newMeta *WorkingMeta, alignedOffset int64) (chunk *Chunk, working *WorkingChunk)
- func (n *InodeMgr) RestoreInodeTree(inodes []*common.InodeTreeMsg)
- func (n *InodeMgr) RestoreMetas(metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg)
- func (n *InodeMgr) SetChunkNoLock(chunk *Chunk, h MetaRWHandler) (*WorkingChunk, int32)
- func (n *InodeMgr) UnlockPersistInode(inode *Inode, inodeKey InodeKeyType)
- func (n *InodeMgr) UpdateMetaAttr(inodeKey InodeKeyType, mode uint32, ts int64) (*WorkingMeta, int32)
- func (n *InodeMgr) UpdateMetaXattr(inodeKey InodeKeyType, expireMs int32, dirtyMgr *DirtyMgr) int32
- func (n *InodeMgr) VectorReadChunk(h MetaRWHandler, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, reply int32)
- type JoinMigrationOp
- type LeaveMigrationOp
- type ListBlobsInput
- type ListBlobsOutput
- type LocalInode
- type LocalReadHistory
- func (c *LocalReadHistory) Add(inodeKey InodeKeyType, offset int64, length int)
- func (c *LocalReadHistory) CheckReset() (ok bool)
- func (c *LocalReadHistory) Delete(inodeKey InodeKeyType)
- func (c *LocalReadHistory) DropAll()
- func (c *LocalReadHistory) Has(inodeKey InodeKeyType, offset int64) (int, bool)
- type LogIdType
- type LogOffsetPair
- type MakeBucketInput
- type MakeBucketOutput
- type MemoryPool
- type MetaRWHandler
- type MigrationId
- type MpuAbortOp
- type MpuAddOp
- type MpuAddOut
- type MpuContext
- type MultipartBlobAbortOutput
- type MultipartBlobAddInput
- type MultipartBlobAddOutput
- type MultipartBlobBeginInput
- type MultipartBlobCommitInput
- type MultipartBlobCommitOutput
- type MultipartExpireInput
- type MultipartExpireOutput
- type MyHashKey
- type MyRandString
- type NoOpCommand
- type NodeServer
- func (n *NodeServer) AbortWriteObject(recordMap map[string][]*common.StagingChunkMsg)
- func (n *NodeServer) CheckReset() (ok bool)
- func (n *NodeServer) CoreDump(_ context.Context, _ *api.Void) (*api.Void, error)
- func (n *NodeServer) CreateObject(parentKey string, parentInodeKey InodeKeyType, name string, ...) (meta *WorkingMeta, err error)
- func (n *NodeServer) DropCache(_ context.Context, _ *api.Void) (*api.ApiRet, error)
- func (n *NodeServer) EndOp()
- func (n *NodeServer) EvictionThread(cacheCapacityBytes int64)
- func (n *NodeServer) ExecDataRpc(msg RpcMsg, sa common.NodeAddrInet4, fd int, pipeFds [2]int, ...) (noData bool)
- func (n *NodeServer) ExecRpcThread(msg RpcMsg, sa common.NodeAddrInet4, fd int)
- func (n *NodeServer) FlushObject(inodeKey InodeKeyType, records []*common.UpdateChunkRecordMsg, mTime int64, ...) (meta *WorkingMeta, err error)
- func (n *NodeServer) FlusherThread()
- func (n *NodeServer) ForceStop()
- func (n *NodeServer) GetApiIpAndPort(RpcMsg) *common.GetApiIpAndPortRet
- func (n *NodeServer) GetApiIpAndPortRemote(node RaftNode) (apiAddr string, apiPort int, reply int32)
- func (n *NodeServer) GetApiPort(leader RaftNode) (apiPort int, reply int32)
- func (n *NodeServer) GetConfig(context.Context, *api.Void) (*api.GetConfigRet, error)
- func (n *NodeServer) GetMeta(inodeKey InodeKeyType, key string, parent InodeKeyType) (*WorkingMeta, map[string]InodeKeyType, error)
- func (n *NodeServer) GetTrackerNode(context.Context, *api.Void) (*api.GetTrackerNodeRet, error)
- func (n *NodeServer) HardLinkObject(srcInodeId fuseops.InodeID, srcParent InodeKeyType, dstParentKey string, ...) (meta *WorkingMeta, err error)
- func (n *NodeServer) Init(back *ObjCacheBackend) error
- func (n *NodeServer) IsReady(_ context.Context, _ *api.Void) (*api.ApiRet, error)
- func (n *NodeServer) LockNode()
- func (n *NodeServer) Panic(_ context.Context, _ *api.Void) (*api.Void, error)
- func (n *NodeServer) PersistAllDirty()
- func (n *NodeServer) PersistObject(inodeId fuseops.InodeID) (meta *WorkingMeta, err error)
- func (n *NodeServer) PrefetchChunk(h MetaRWHandler, offset int64, length int64)
- func (n *NodeServer) ReadAheadChunk(h MetaRWHandler, offset int64, size int64)
- func (n *NodeServer) ReadChunk(h MetaRWHandler, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
- func (n *NodeServer) Rejuvenate(_ context.Context, _ *api.Void) (*api.ApiRet, error)
- func (n *NodeServer) RemoveInodeMetadataKey(_ fuseops.InodeID, _ string) error
- func (n *NodeServer) RenameObject(srcParentKey string, srcParent InodeKeyType, dstParentKey string, ...) (err error)
- func (n *NodeServer) RequestJoin(_ context.Context, args *api.RequestJoinArgs) (*api.ApiRet, error)
- func (n *NodeServer) RequestJoinLocal(headWorkerAddr string, headWorkerPort int) error
- func (n *NodeServer) RequestLeave() int32
- func (n *NodeServer) RequestRemoveNode(_ context.Context, args *api.RequestLeaveArgs) (*api.ApiRet, error)
- func (n *NodeServer) SetFs(fs *ObjcacheFileSystem)
- func (n *NodeServer) SetInodeMetadataKey(_ fuseops.InodeID, name string, value []byte, flags uint32) error
- func (n *NodeServer) Shutdown(deleteStateFile bool) bool
- func (n *NodeServer) StartGrpcServer() error
- func (n *NodeServer) Terminate(_ context.Context, _ *api.Void) (*api.Void, error)
- func (n *NodeServer) TerminateThread()
- func (n *NodeServer) TruncateObject(inodeId fuseops.InodeID, size int64) (meta *WorkingMeta, err error)
- func (n *NodeServer) TryBeginOp() bool
- func (n *NodeServer) TryLockNode() bool
- func (n *NodeServer) UnlinkObject(parentFullPath string, parentId fuseops.InodeID, name string, ...) (err error)
- func (n *NodeServer) UnlockNode()
- func (n *NodeServer) UpdateNodeListAsClient() error
- func (n *NodeServer) UpdateObjectAttr(inodeKeyType InodeKeyType, mode uint32, ts int64) (meta *WorkingMeta, err error)
- func (n *NodeServer) VectorReadFastPath(h MetaRWHandler, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
- func (n *NodeServer) WaitNodeUnlocked()
- func (n *NodeServer) WaitShutdown()
- func (n *NodeServer) WriteChunk(inodeKey InodeKeyType, chunkSize int64, offset int64, size int64, buf []byte) ([]*common.UpdateChunkRecordMsg, int32)
- type ObjCacheBackend
- type ObjcacheFileSystem
- func (fs *ObjcacheFileSystem) BatchForget(_ context.Context, op *fuseops.BatchForgetOp) error
- func (fs *ObjcacheFileSystem) CheckReset() (ok bool)
- func (fs *ObjcacheFileSystem) CreateFile(_ context.Context, op *fuseops.CreateFileOp) (err error)
- func (fs *ObjcacheFileSystem) CreateLink(_ context.Context, op *fuseops.CreateLinkOp) (err error)
- func (fs *ObjcacheFileSystem) CreateSymlink(_ context.Context, op *fuseops.CreateSymlinkOp) (err error)
- func (fs *ObjcacheFileSystem) Destroy()
- func (fs *ObjcacheFileSystem) EndReset()
- func (fs *ObjcacheFileSystem) Fallocate(_ context.Context, op *fuseops.FallocateOp) (err error)
- func (fs *ObjcacheFileSystem) FlushFile(_ context.Context, op *fuseops.FlushFileOp) (err error)
- func (fs *ObjcacheFileSystem) ForgetInode(_ context.Context, op *fuseops.ForgetInodeOp) error
- func (fs *ObjcacheFileSystem) FuseMount(args *common.ObjcacheCmdlineArgs, flags *common.ObjcacheConfig) (err error)
- func (fs *ObjcacheFileSystem) GetInodeAttributes(_ context.Context, op *fuseops.GetInodeAttributesOp) (err error)
- func (fs *ObjcacheFileSystem) GetOpenInodes() map[InodeKeyType]bool
- func (fs *ObjcacheFileSystem) GetXattr(_ context.Context, op *fuseops.GetXattrOp) (err error)
- func (fs *ObjcacheFileSystem) InitNodeListAsClient() (err error)
- func (fs *ObjcacheFileSystem) ListXattr(_ context.Context, op *fuseops.ListXattrOp) (err error)
- func (fs *ObjcacheFileSystem) LookUpInode(_ context.Context, op *fuseops.LookUpInodeOp) (err error)
- func (fs *ObjcacheFileSystem) MkDir(_ context.Context, op *fuseops.MkDirOp) (err error)
- func (fs *ObjcacheFileSystem) MkNode(_ context.Context, op *fuseops.MkNodeOp) (err error)
- func (fs *ObjcacheFileSystem) OpenDir(_ context.Context, op *fuseops.OpenDirOp) (err error)
- func (fs *ObjcacheFileSystem) OpenFile(_ context.Context, op *fuseops.OpenFileOp) (err error)
- func (fs *ObjcacheFileSystem) PostOp(_ context.Context, op interface{})
- func (fs *ObjcacheFileSystem) ReadDir(_ context.Context, op *fuseops.ReadDirOp) (err error)
- func (fs *ObjcacheFileSystem) ReadFile(_ context.Context, op *fuseops.ReadFileOp) (err error)
- func (fs *ObjcacheFileSystem) ReadSymlink(_ context.Context, op *fuseops.ReadSymlinkOp) (err error)
- func (fs *ObjcacheFileSystem) ReleaseDirHandle(_ context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
- func (fs *ObjcacheFileSystem) ReleaseFileHandle(_ context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
- func (fs *ObjcacheFileSystem) RemoveXattr(_ context.Context, op *fuseops.RemoveXattrOp) (err error)
- func (fs *ObjcacheFileSystem) Rename(_ context.Context, op *fuseops.RenameOp) (err error)
- func (fs *ObjcacheFileSystem) RequestJoinLocal(headWorkerAddr string, headWorkerPort int) (err error)
- func (fs *ObjcacheFileSystem) Reset(shutdown bool) error
- func (fs *ObjcacheFileSystem) RmDir(_ context.Context, op *fuseops.RmDirOp) (err error)
- func (fs *ObjcacheFileSystem) SetInodeAttributes(_ context.Context, op *fuseops.SetInodeAttributesOp) (err error)
- func (fs *ObjcacheFileSystem) SetRoot() error
- func (fs *ObjcacheFileSystem) SetXattr(_ context.Context, op *fuseops.SetXattrOp) (err error)
- func (fs *ObjcacheFileSystem) StatFS(_ context.Context, op *fuseops.StatFSOp) (err error)
- func (fs *ObjcacheFileSystem) SyncFile(_ context.Context, op *fuseops.SyncFileOp) (err error)
- func (fs *ObjcacheFileSystem) Unlink(_ context.Context, op *fuseops.UnlinkOp) (err error)
- func (fs *ObjcacheFileSystem) WaitReset()
- func (fs *ObjcacheFileSystem) WriteFile(_ context.Context, op *fuseops.WriteFileOp) (err error)
- type ObjcacheProc
- type OnDiskLog
- func (d *OnDiskLog) AppendSingleBuffer(buf []byte) (vec *DiskWriteVector, sizeIncrease int64, err error)
- func (d *OnDiskLog) BeginAppendSplice(srcFd int, size int64) (*DiskWriteVector, error)
- func (d *OnDiskLog) BeginAppendWrite(buf []byte) (*DiskWriteVector, error)
- func (d *OnDiskLog) BeginRandomSplice(srcFd int, size int64, logOffset int64) (*DiskWriteVector, error)
- func (d *OnDiskLog) BeginRandomWrite(buf []byte, logOffset int64) (*DiskWriteVector, error)
- func (d *OnDiskLog) CheckReset() (ok bool)
- func (d *OnDiskLog) Clear() (size int64)
- func (d *OnDiskLog) EndWrite(vec *DiskWriteVector) (sizeIncrease int64, err error)
- func (d *OnDiskLog) GetSize() int64
- func (d *OnDiskLog) InitSize(fileSize int64)
- func (d *OnDiskLog) Read(logOffset int64, size int64) (bufs [][]byte, count int64, err error)
- func (d *OnDiskLog) ReadNoCache(buf []byte, logOffset int64, dataLen int64, directIo bool) (count int64, err error)
- func (d *OnDiskLog) ReserveAppendWrite(size int64) (logOffset int64)
- func (d *OnDiskLog) SendZeroCopy(toFd int, logOffset int64, size int32, bufOff *int32) (err error)
- func (d *OnDiskLog) Shrink(newSize int64) (oldSize int64, err error)
- func (d *OnDiskLog) Splice(vec *DiskWriteVector, pipeFds [2]int, bufOff *int32) (err error)
- func (d *OnDiskLog) WaitWrites() (size int64)
- func (d *OnDiskLog) Write(vec *DiskWriteVector) error
- func (d *OnDiskLog) WriteSingleBuffer(buf []byte, logOffset int64) (vec *DiskWriteVector, sizeIncrease int64, err error)
- type OnDiskLogger
- func (c *OnDiskLogger) AddDiskUsage(size int64) int64
- func (c *OnDiskLogger) AppendSingleBuffer(logId LogIdType, buf []byte) (logOffset int64, err error)
- func (c *OnDiskLogger) CheckReset() (ok bool)
- func (c *OnDiskLogger) Clear()
- func (c *OnDiskLogger) Freeze(logId LogIdType)
- func (c *OnDiskLogger) GetDiskLog(logId LogIdType, maxNrCache int, maxWriters int) (disk *OnDiskLog)
- func (c *OnDiskLogger) GetDiskUsage() int64
- func (c *OnDiskLogger) GetSize(logId LogIdType) (size int64)
- func (c *OnDiskLogger) IsFreezed(logId LogIdType) bool
- func (c *OnDiskLogger) PutDiskLog(logId LogIdType, vec *DiskWriteVector, sizeIncrease int64)
- func (c *OnDiskLogger) Read(logId LogIdType, logOffset int64, logBytes int64) (extBuf []byte, err error)
- func (c *OnDiskLogger) ReadNoCache(logId LogIdType, buf []byte, logOffset int64, logBytes int64, directIo bool) (count int64, err error)
- func (c *OnDiskLogger) Remove(logId LogIdType) (size int64, err error)
- func (c *OnDiskLogger) ReserveRange(logId LogIdType, logBytes int64) (offset int64)
- func (c *OnDiskLogger) Reset()
- func (c *OnDiskLogger) SendZeroCopy(logId LogIdType, toFd int, logOffset int64, logBytes int32, bufOff *int32) (err error)
- func (c *OnDiskLogger) WriteSingleBuffer(logId LogIdType, buf []byte, logOffset int64) error
- func (c *OnDiskLogger) ZeroCopyRead(logId LogIdType, logOffset int64, logBytes int64) (bufs [][]byte, count int64, err error)
- type OnDiskState
- type PageBuffer
- type PagePool
- type ParticipantOp
- func NewAbortParticipantOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewCommitDeleteChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewCommitExpandChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewCommitParticipantOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewCommitPersistChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewCommitUpdateChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewCreateChildMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewCreateMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewDeleteMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewFillNodeListOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewJoinMigrationOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewLeaveMigrationOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewMpuAddOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewRenameMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewTruncateMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewUnlinkMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewUpdateChunkOpFromProtoMsg(m proto.Message, logId LogIdType, logOffset int64, dataLength uint32) (ParticipantOp, uint64)
- func NewUpdateMetaKeyOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewUpdateMetaSizeOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- func NewUpdateNodeListOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
- type ParticipantTx
- type PersistChunkCommand
- type PersistCoordinatorCommand
- func (c PersistCoordinatorCommand) Commit(n *NodeServer)
- func (c PersistCoordinatorCommand) GetExtCmdId() uint16
- func (c PersistCoordinatorCommand) GetTxId() TxId
- func (c PersistCoordinatorCommand) IsSingleShot() bool
- func (c PersistCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
- func (c PersistCoordinatorCommand) RemoteCommit(raftGroup *RaftGroupMgr) []ParticipantOp
- type PrefetchChunkOp
- type PrepareRpcCaller
- func (c PrepareRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c PrepareRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c PrepareRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c PrepareRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
- func (c PrepareRpcCaller) TryNext(n *NodeServer, i int) bool
- type PutBlobInput
- type PutBlobOutput
- type RaftBasicReply
- type RaftCommand
- func NewAddServerCommandFromBytes(l *AppendEntryCommand) RaftCommand
- func NewCommitCommandFromBytes(l *AppendEntryCommand) RaftCommand
- func NewExtLogCommandFromBytes(l *AppendEntryCommand) RaftCommand
- func NewNoOpCommandFromBytes(_ *AppendEntryCommand) RaftCommand
- func NewRemoveServerCommandFromBytes(l *AppendEntryCommand) RaftCommand
- func NewResetExtCommandFromBytes(l *AppendEntryCommand) RaftCommand
- type RaftGroupMgr
- func (m *RaftGroupMgr) Add(node RaftNode)
- func (m *RaftGroupMgr) BeginRaftRead(raft *RaftInstance, nodeListVer uint64) (r RaftBasicReply)
- func (m *RaftGroupMgr) CheckReset() (ok bool)
- func (m *RaftGroupMgr) Clean()
- func (m *RaftGroupMgr) CommitUpdate(nodes []RaftNode, isAdd bool, nodeListVer uint64)
- func (m *RaftGroupMgr) GetChunkOwnerGroupId(inodeKey InodeKeyType, offset int64, chunkSize int64) (string, bool)
- func (m *RaftGroupMgr) GetGroupLeader(groupId string, l *RaftNodeList) (RaftNode, bool)
- func (m *RaftGroupMgr) GetGroupLeaderNoLock(groupId string, l *RaftNodeList) (RaftNode, bool)
- func (m *RaftGroupMgr) GetNodeListLocal() *RaftNodeList
- func (m *RaftGroupMgr) GetNumberOfGroups() int
- func (m *RaftGroupMgr) GetRemovedNodeListLocal(removed RaftNode) *RaftNodeList
- func (m *RaftGroupMgr) GetReplica(leader RaftNode) (replica RaftNode, found bool)
- func (m *RaftGroupMgr) Remove(nodeId uint32, groupId string)
- func (m *RaftGroupMgr) ResetWithRaftNodeListMsg(msg *common.RaftNodeListMsg)
- func (m *RaftGroupMgr) SetNodeListDirect(nodes []*api.ApiNodeMsg, nodeListVer uint64)
- func (m *RaftGroupMgr) UpdateLeader(newLeader RaftNode) bool
- func (m *RaftGroupMgr) UpdateNodeListLocal(isAdd bool, nodes []RaftNode, nodeListVer uint64)
- type RaftInstance
- func (n *RaftInstance) AddServerLocal(sa common.NodeAddrInet4, serverId uint32) int32
- func (n *RaftInstance) AppendBootstrapLogs(groupId string) int32
- func (n *RaftInstance) AppendEntriesLocal(rc RaftCommand, extLogCmd ExtLogCommandImpl) (ret interface{}, lastLogIndex uint64, reply int32)
- func (n *RaftInstance) AppendEntriesRpcBottomHalf(msg RpcMsg, sa common.NodeAddrInet4, fd int) (hadEntry bool)
- func (n *RaftInstance) AppendEntriesRpcTopHalf(msg RpcMsg, sa common.NodeAddrInet4, fd int) (success bool, abort bool)
- func (n *RaftInstance) AppendExtendedLogEntry(extLogCmd ExtLogCommandImpl) int32
- func (n *RaftInstance) AppendInitEntry(rc RaftCommand) int32
- func (n *RaftInstance) ApplyAll(cmd *AppendEntryCommand, logIndex uint64, extLogCmd ExtLogCommandImpl)
- func (n *RaftInstance) CatchUpLog(sa common.NodeAddrInet4, serverId uint32, timeout time.Duration) int32
- func (n *RaftInstance) CheckReset() (ok bool)
- func (n *RaftInstance) CleanExtLogger()
- func (n *RaftInstance) GenerateCoordinatorId() CoordinatorId
- func (n *RaftInstance) GetExtLogId() LogIdType
- func (n *RaftInstance) GetExtLogIdForLogCompaction() LogIdType
- func (n *RaftInstance) HandleAppendEntriesResponse(msg RpcMsg, sa common.NodeAddrInet4) int32
- func (n *RaftInstance) HandleRequestVoteResponse(msg RpcMsg, sa common.NodeAddrInet4) int32
- func (n *RaftInstance) HeartBeatRecvThread(interval time.Duration)
- func (n *RaftInstance) HeartBeaterThread()
- func (n *RaftInstance) Init(passive bool)
- func (n *RaftInstance) IsLeader() (r RaftBasicReply)
- func (n *RaftInstance) RemoveAllServerIds() int32
- func (n *RaftInstance) RemoveServerLocal(serverId uint32) int32
- func (n *RaftInstance) ReplayAll() int32
- func (n *RaftInstance) ReplicateLog(lastLogIndex uint64, added *uint32, addedSa *common.NodeAddrInet4, ...) (reply int32)
- func (n *RaftInstance) RequestVoteRpc(msg RpcMsg, sa common.NodeAddrInet4, fd int) bool
- func (n *RaftInstance) SetExt(logId uint32, seqNum uint32)
- func (n *RaftInstance) Shutdown()
- func (n *RaftInstance) StartVoting()
- func (n *RaftInstance) StepDown(lastLogIndex uint64)
- func (n *RaftInstance) SwitchExtLog(logId uint32)
- func (n *RaftInstance) SwitchFileAndAppendEntriesLocal(rc RaftCommand, extLogCmd ExtLogCommandImpl) (ret interface{}, lastLogIndex uint64, reply int32)
- func (n *RaftInstance) SyncBeforeClientQuery() (r RaftBasicReply)
- func (n *RaftInstance) WaitPreviousCommits()
- type RaftLogger
- func (f *RaftLogger) AppendCommand(cmd AppendEntryCommand) (logIndex uint64, reply int32)
- func (f *RaftLogger) CheckReset() (ok bool)
- func (f *RaftLogger) Clear()
- func (f *RaftLogger) CompactLog() (reply int32)
- func (f *RaftLogger) GetCurrentLogLength() uint64
- func (f *RaftLogger) LoadCommandAt(logIndex uint64) (cmd AppendEntryCommand, reply int32)
- func (f *RaftLogger) Shrink(logIndex uint64) (reply int32)
- func (f *RaftLogger) SwitchFileAndAppendCommand(cmd AppendEntryCommand) (logIndex uint64, reply int32)
- type RaftNode
- type RaftNodeList
- type ReadChunkOp
- type ReadChunkOpRet
- type ReadRpcMsgState
- type ReadSeekerCloser
- type ReaderBufferCache
- func (c *ReaderBufferCache) CheckReset() (ok bool)
- func (c *ReaderBufferCache) Delete(logId LogIdType) (size int64)
- func (c *ReaderBufferCache) DropAll()
- func (c *ReaderBufferCache) EndFill(logId LogIdType, offset int64)
- func (c *ReaderBufferCache) EndFillWithPut(reader *BufferedDiskPageReader)
- func (c *ReaderBufferCache) GetCacheOrBeginFill(logId LogIdType, offset int64) (reader *BufferedDiskPageReader, beginFill bool)
- func (c *ReaderBufferCache) GetCacheWithFillWait(logId LogIdType, stagPart *StagingChunkPart, offset int64) *BufferedDiskPageReader
- func (c *ReaderBufferCache) GetNewBufferedDiskPageReader(logId LogIdType, stag *StagingChunk, blocking bool) (*BufferedDiskPageReader, error)
- func (c *ReaderBufferCache) ReleaseInFlightBuffer(reader *BufferedDiskPageReader)
- func (c *ReaderBufferCache) SetEvictable(reader *BufferedDiskPageReader)
- func (c *ReaderBufferCache) TryBeginFill(logId LogIdType, offset int64) (beginFill bool)
- type RecordMigratedAddChunkCommand
- func (c RecordMigratedAddChunkCommand) Commit(n *NodeServer)
- func (c RecordMigratedAddChunkCommand) GetExtCmdId() uint16
- func (c RecordMigratedAddChunkCommand) GetTxId() TxId
- func (c RecordMigratedAddChunkCommand) IsSingleShot() bool
- func (c RecordMigratedAddChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- type RecordMigratedAddMetaCommand
- func (c RecordMigratedAddMetaCommand) Commit(n *NodeServer)
- func (c RecordMigratedAddMetaCommand) GetExtCmdId() uint16
- func (c RecordMigratedAddMetaCommand) GetTxId() TxId
- func (c RecordMigratedAddMetaCommand) IsSingleShot() bool
- func (c RecordMigratedAddMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- type RecordMigratedRemoveChunkCommand
- func (c RecordMigratedRemoveChunkCommand) Commit(n *NodeServer)
- func (c RecordMigratedRemoveChunkCommand) GetExtCmdId() uint16
- func (c RecordMigratedRemoveChunkCommand) GetTxId() TxId
- func (c RecordMigratedRemoveChunkCommand) IsSingleShot() bool
- func (c RecordMigratedRemoveChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- type RecordMigratedRemoveMetaCommand
- func (c RecordMigratedRemoveMetaCommand) Commit(n *NodeServer)
- func (c RecordMigratedRemoveMetaCommand) GetExtCmdId() uint16
- func (c RecordMigratedRemoveMetaCommand) GetTxId() TxId
- func (c RecordMigratedRemoveMetaCommand) IsSingleShot() bool
- func (c RecordMigratedRemoveMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- type RemoteBufferCache
- func (c *RemoteBufferCache) CheckReset() (ok bool)
- func (c *RemoteBufferCache) Delete(inode InodeKeyType)
- func (c *RemoteBufferCache) DropAll()
- func (c *RemoteBufferCache) EndFill(inodeKey InodeKeyType, offset int64)
- func (c *RemoteBufferCache) EndFillWithPut(page *RemotePageBuffer)
- func (c *RemoteBufferCache) GetCache(inodeKey InodeKeyType, offset int64) (SlicedPageBuffer, bool)
- func (c *RemoteBufferCache) GetCacheOrBeginFill(inodeKey InodeKeyType, offset int64) (p *RemotePageBuffer, beginFill bool)
- func (c *RemoteBufferCache) GetCacheWithFillWait(inodeKey InodeKeyType, offset int64, length int) (SlicedPageBuffer, bool)
- func (c *RemoteBufferCache) GetRemotePageBuffer(inodeKey InodeKeyType, offset int64, length int64, blocking bool) (*RemotePageBuffer, error)
- func (c *RemoteBufferCache) Has(inodekey InodeKeyType, offset int64) bool
- func (c *RemoteBufferCache) ReleaseInFlightBuffer(p *RemotePageBuffer)
- func (c *RemoteBufferCache) SetEvictable(page *RemotePageBuffer) (size int64)
- type RemotePageBuffer
- type RemoveBucketInput
- type RemoveBucketOutput
- type RemoveNonDirtyChunksCommand
- func (c RemoveNonDirtyChunksCommand) Commit(n *NodeServer)
- func (c RemoveNonDirtyChunksCommand) GetExtCmdId() uint16
- func (c RemoveNonDirtyChunksCommand) GetTxId() TxId
- func (c RemoveNonDirtyChunksCommand) IsSingleShot() bool
- func (c RemoveNonDirtyChunksCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- type RemoveServerCommand
- type RenameBlobInput
- type RenameBlobOutput
- type RenameCoordinatorCommand
- func (r *RenameCoordinatorCommand) AddMeta(txRet TxRet, oldKey string, newKey string, selfGroup string)
- func (r *RenameCoordinatorCommand) AddParent(txRet TxRet, selfGroup string)
- func (c RenameCoordinatorCommand) Commit(n *NodeServer)
- func (c RenameCoordinatorCommand) GetExtCmdId() uint16
- func (c RenameCoordinatorCommand) GetTxId() TxId
- func (c RenameCoordinatorCommand) IsSingleShot() bool
- func (c RenameCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- func (c RenameCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
- type RenameMetaInfo
- type RenameMetaOp
- type ResetExtCommand
- type RestoreDirtyChunkOp
- type RestoreDirtyMetaOp
- type RpcCaller
- type RpcClient
- func (w *RpcClient) AddFd(na common.NodeAddrInet4, fd int) error
- func (w *RpcClient) BroadcastAndWaitRpcMsg(messages map[int]RpcMsg, raft *RaftInstance, timeout time.Duration, debug bool) (nrSuccess int)
- func (w *RpcClient) CheckReset() (ok bool)
- func (w *RpcClient) Close() (err error)
- func (w *RpcClient) Connect(na common.NodeAddrInet4) (fd int, err error)
- func (w *RpcClient) RemoveFd(fd int)
- func (w *RpcClient) SendAndWait(msg RpcMsg, sa common.NodeAddrInet4, extLogger *OnDiskLogger, ...) (replyMsg RpcMsg, err error)
- func (w *RpcClient) UnicastRpcMsg(msg RpcMsg, sa common.NodeAddrInet4, extLogger *OnDiskLogger, ...) (err error)
- func (w *RpcClient) WaitAndCheckRaftReply(raft *RaftInstance, servers map[int]*WriteRpcState, timeout time.Duration, ...) (nrSuccess int)
- func (w *RpcClient) WaitAndGetRpcReply(fd int, timeout time.Duration) (msg RpcMsg, reply int32)
- type RpcClientConnectionV2
- func (w *RpcClientConnectionV2) AsyncObjcacheRpc(extCmdId uint16, seqNum uint64, args proto.Message, sa common.NodeAddrInet4, ...) (reply int32)
- func (w *RpcClientConnectionV2) CallObjcacheRpc(extCmdId uint16, seqNum uint64, args proto.Message, timeout time.Duration, ...) (reply int32)
- func (w *RpcClientConnectionV2) CallObjcacheRpcNoTimeout(extCmdId uint16, seqNum uint64, args proto.Message, extLogger *OnDiskLogger, ...) (reply int32)
- func (w *RpcClientConnectionV2) Close() bool
- func (w *RpcClientConnectionV2) Down() int32
- func (w *RpcClientConnectionV2) IsFree() bool
- func (w *RpcClientConnectionV2) RemoveRpcArgs(seqNum uint64)
- func (w *RpcClientConnectionV2) SendRpcMsg(msg RpcMsg, extLogger *OnDiskLogger, wakeUpInterval time.Duration, ...) (err error)
- func (w *RpcClientConnectionV2) StoreRpcArgs(seqNum uint64, args *RpcSeqNumArgs)
- func (w *RpcClientConnectionV2) Up()
- func (w *RpcClientConnectionV2) WaitAndGetRpcReply(seqNum uint64, timeout time.Duration, enableLog bool) (msg RpcMsg, err error)
- type RpcClientV2
- func (w *RpcClientV2) AsyncObjcacheRpc(extCmdId uint16, args proto.Message, sa common.NodeAddrInet4, ...) (con *RpcClientConnectionV2, seqNum uint64, reply int32)
- func (w *RpcClientV2) CallObjcacheRpc(extCmdId uint16, args proto.Message, sa common.NodeAddrInet4, ...) (reply int32)
- func (w *RpcClientV2) CheckReset() (ok bool)
- func (w *RpcClientV2) Close()
- func (w *RpcClientV2) WaitAsyncObjcacheRpc(con *RpcClientConnectionV2, seqNum uint64, ret proto.Message) (reply int32)
- type RpcMgr
- func (o *RpcMgr) AbortAll(tm *TxIdMgr, retryInterval time.Duration, nodeLock bool)
- func (o *RpcMgr) CallRpc(c RpcCaller) (ret RpcRet, r RaftBasicReply)
- func (o *RpcMgr) CallRpcOneShot(c RpcCaller, nodeList *RaftNodeList) (ret RpcRet, r RaftBasicReply)
- func (o *RpcMgr) CheckReset() (ok bool)
- func (o *RpcMgr) Commit(extLog CoordinatorCommand, retryInterval time.Duration) (reply int32)
- func (o *RpcMgr) CommitCoordinator(extLog CoordinatorCommand, retryInterval time.Duration) (reply int32)
- func (o *RpcMgr) DeleteAndGet(seq TxId) (call RpcState, ok bool)
- func (o *RpcMgr) DeleteAndUnlockLocalAll(tm *TxIdMgr)
- func (o *RpcMgr) Enter(seq TxId) (call RpcState, duplicated bool, passed bool)
- func (o *RpcMgr) Get(seq TxId) (call RpcState, ok bool)
- func (o *RpcMgr) Record(seq TxId, ret RpcRet)
- func (o *RpcMgr) RestoreDirtyChunksBottomHalf(m proto.Message, logId LogIdType, logOffset int64, dataLength uint32, ...) (proto.Message, []SlicedPageBuffer)
- func (o *RpcMgr) UpdateChunkBottomHalf(m proto.Message, logId LogIdType, logOffset int64, dataLength uint32, ...) proto.Message
- type RpcMsg
- func (d *RpcMsg) CreateOptControlHeader(totalExtLogLength uint32, nrEntries uint32, entryPayloadLength uint16)
- func (d *RpcMsg) FillAppendEntriesResponseArgs(term uint32, success bool, logLength uint64, reply int32)
- func (d *RpcMsg) FillAppendEntryArgs(term uint32, prevTerm uint32, prevIndex uint64, leaderCommit uint64, ...)
- func (d *RpcMsg) FillExecProtoBufArgs(execId uint16, seqNum uint64, m proto.Message, dataBufLen int, isResponse bool) int32
- func (d *RpcMsg) FillRequestVoteArgs(term uint32, candidateId uint32, lastLogTerm uint32, lastLogIndex uint64)
- func (d *RpcMsg) FillRequestVoteResponseArgs(term uint32, voteGranted bool, reply int32)
- func (d *RpcMsg) GetAppendEntriesResponseArgs() (term uint32, success bool, logLength uint64, reply int32)
- func (d *RpcMsg) GetAppendEntryArgs() (term uint32, prevTerm uint32, prevIndex uint64, leaderCommit uint64, ...)
- func (d *RpcMsg) GetAppendEntryCommandDiskFormat(off uint16) (cmd AppendEntryCommand, nextOff uint16)
- func (d *RpcMsg) GetAppendEntryExtHeader(off uint16) (extCmdId uint16, extEntryPayload []byte, nextOff uint16)
- func (d *RpcMsg) GetAppendEntryNrEntries() (nrEntries uint32)
- func (d *RpcMsg) GetArrivingMsgLengths(off uint16, optHeaderLength *uint16) (complete bool)
- func (d *RpcMsg) GetCmdId() uint8
- func (d *RpcMsg) GetCmdPayload() []byte
- func (d *RpcMsg) GetExecProtoBufRpcId(payload []byte) (rpcId uint16)
- func (d *RpcMsg) GetExecProtoBufRpcSeqNum(payload []byte) (seqNum uint64)
- func (d *RpcMsg) GetOptControlHeader() (totalExtLogLength uint32, nrEntries uint32)
- func (d *RpcMsg) GetOptHeaderLength() uint16
- func (d *RpcMsg) GetOptHeaderPayload() []byte
- func (d *RpcMsg) GetRequestVoteArgs() (term uint32, candidateId uint32, lastLogTerm uint32, lastLogIndex uint64)
- func (d *RpcMsg) GetRequestVoteResponseArgs() (term uint32, voteGranted bool, reply int32)
- func (d *RpcMsg) ParseExecProtoBufMessage(m proto.Message) (reply int32)
- func (d *RpcMsg) SetCmdControlHeader(cmdId uint8, optHeaderLength uint16)
- func (d *RpcMsg) SetNrEntries(nrEntries uint32)
- func (d *RpcMsg) SetOptHeaderLength(optHeaderLength uint16)
- func (d *RpcMsg) SetTotalExtLogLength(totalExtLogLength uint32)
- type RpcReplyClient
- type RpcRet
- type RpcSeqNumArgs
- type RpcState
- type RpcStatePointer
- type RpcThreads
- type S3Backend
- func (s *S3Backend) Bucket() string
- func (s *S3Backend) Capabilities() *Capabilities
- func (s *S3Backend) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (s *S3Backend) Delegate() interface{}
- func (s *S3Backend) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (s *S3Backend) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (s *S3Backend) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (s *S3Backend) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (s *S3Backend) Init(key string) error
- func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, string, error)
- func (s *S3Backend) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (s *S3Backend) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (s *S3Backend) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (s *S3Backend) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (s *S3Backend) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (s *S3Backend) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (s *S3Backend) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (s *S3Backend) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (s *S3Backend) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- type S3Config
- type SingleShotOp
- func NewGetApiIpAndPortOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
- func NewGetMetaOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
- func NewPrefetchChunkOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
- func NewReadChunkOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
- func NewRestoreDirtyChunkOpFromProtoMsg(m proto.Message, logId LogIdType, logOffset int64, dataLength uint32) (fn SingleShotOp, nodeListVer uint64)
- func NewRestoreDirtyMetaOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
- func NewUpdateMetaAttrOpFromMsg(msg RpcMsg) (SingleShotOp, uint64, int32)
- type SingleShotRpcCaller
- func (c SingleShotRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c SingleShotRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c SingleShotRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c SingleShotRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
- func (c SingleShotRpcCaller) TryNext(n *NodeServer, i int) bool
- type SlicedPageBuffer
- type Snapshot
- type StagingChunk
- func (s *StagingChunk) AppendToLog(inodeMgr *InodeMgr, reader *BufferedDiskPageReader, fetchKey string) (err error)
- func (s *StagingChunk) GetObject(inodeMgr *InodeMgr, reader *BufferedDiskPageReader, fetchOffset int64) error
- func (s *StagingChunk) ReadObject(inodeMgr *InodeMgr, reader *BufferedDiskPageReader) (err error)
- type StagingChunkPart
- type StaleInode
- type StorageBackend
- type StorageBackendInitError
- func (s StorageBackendInitError) Bucket() string
- func (e StorageBackendInitError) Capabilities() *Capabilities
- func (e StorageBackendInitError) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (e StorageBackendInitError) Delegate() interface{}
- func (e StorageBackendInitError) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (e StorageBackendInitError) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (e StorageBackendInitError) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (e StorageBackendInitError) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (e StorageBackendInitError) Init(key string) error
- func (e StorageBackendInitError) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (e StorageBackendInitError) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (e StorageBackendInitError) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (e StorageBackendInitError) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (e StorageBackendInitError) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (e StorageBackendInitError) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (e StorageBackendInitError) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (e StorageBackendInitError) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (e StorageBackendInitError) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (e StorageBackendInitError) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- type StorageBackendInitWrapper
- func (s *StorageBackendInitWrapper) Bucket() string
- func (s *StorageBackendInitWrapper) Capabilities() *Capabilities
- func (s *StorageBackendInitWrapper) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
- func (s *StorageBackendInitWrapper) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
- func (s *StorageBackendInitWrapper) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
- func (s *StorageBackendInitWrapper) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
- func (s *StorageBackendInitWrapper) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
- func (s *StorageBackendInitWrapper) Init(key string) error
- func (s *StorageBackendInitWrapper) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
- func (s *StorageBackendInitWrapper) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
- func (s *StorageBackendInitWrapper) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
- func (s *StorageBackendInitWrapper) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
- func (s *StorageBackendInitWrapper) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
- func (s *StorageBackendInitWrapper) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
- func (s *StorageBackendInitWrapper) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
- type TruncateCoordinatorCommand
- func (c TruncateCoordinatorCommand) Commit(n *NodeServer)
- func (c TruncateCoordinatorCommand) GetExtCmdId() uint16
- func (c TruncateCoordinatorCommand) GetTxId() TxId
- func (c TruncateCoordinatorCommand) IsSingleShot() bool
- func (c TruncateCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
- func (c TruncateCoordinatorCommand) RemoteCommit(raftGroup *RaftGroupMgr) []ParticipantOp
- type TruncateMetaOp
- type Tx
- type TxId
- type TxIdMgr
- type TxMgr
- type TxRet
- type UnlinkMetaOp
- type UpadteChunkRpcCaller
- func (c UpadteChunkRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c UpadteChunkRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c UpadteChunkRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
- func (c UpadteChunkRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
- func (c UpadteChunkRpcCaller) TryNext(n *NodeServer, i int) bool
- type UpdateChunkCommand
- type UpdateChunkOp
- type UpdateMetaAttrCommand
- type UpdateMetaAttrOp
- type UpdateMetaCommand
- type UpdateMetaKeyCommand
- type UpdateMetaKeyOp
- type UpdateMetaSizeOp
- type UpdateNodeListCommand
- type UpdateNodeListCoordinatorCommand
- func (c *UpdateNodeListCoordinatorCommand) AddNode(txRet TxRet)
- func (c UpdateNodeListCoordinatorCommand) Commit(n *NodeServer)
- func (c UpdateNodeListCoordinatorCommand) GetExtCmdId() uint16
- func (c UpdateNodeListCoordinatorCommand) GetTxId() TxId
- func (c UpdateNodeListCoordinatorCommand) IsSingleShot() bool
- func (c UpdateNodeListCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
- func (c UpdateNodeListCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
- type UpdateNodeListOp
- type UpdateParentInfo
- type UpdateParentMetaCommand
- type UpdateParentRet
- type WorkingChunk
- func (c *WorkingChunk) AddNewStag(raft *RaftInstance, backingKey string, offset int64, updateType byte, ...) int32
- func (c *WorkingChunk) AddNewStagFromMsg(l *common.StagingChunkAddMsg)
- func (c *WorkingChunk) AddStag(stag *StagingChunk)
- func (c *WorkingChunk) AddStagingChunkFromAddMsg(cLog *common.WorkingChunkAddMsg)
- func (c *WorkingChunk) Copy(chunkVer uint32) *WorkingChunk
- func (c *WorkingChunk) DeleteFromVersionListNoLock()
- func (c *WorkingChunk) GetNext(inodeMgr *InodeMgr, offset int64, blocking bool) (buf SlicedPageBuffer, err error)
- func (c *WorkingChunk) GetReader(chunkSize int64, objectSize int64, offset int64, inodeMgr *InodeMgr, ...) *ChunkReader
- func (c *WorkingChunk) Head() *StagingChunkPart
- func (c *WorkingChunk) LastNonDeletedPtr() *StagingChunkPart
- func (c *WorkingChunk) NewStagingChunkPart(length int64, stag *StagingChunk, slop int64) *StagingChunkPart
- func (c *WorkingChunk) Prefetch(inodeMgr *InodeMgr)
- func (c *WorkingChunk) ReadNext(inodeMgr *InodeMgr, p []byte, offset int64, blocking bool) (int64, error)
- func (c *WorkingChunk) Size() int64
- func (c *WorkingChunk) Tail() *StagingChunkPart
- func (c *WorkingChunk) WriteToNext(inodeMgr *InodeMgr, w io.Writer, offset int64, blocking bool) (int64, error)
- type WorkingMeta
- type WriteRpcState
Constants ¶
const ( StagingChunkData = byte(1) StagingChunkDelete = byte(2) StagingChunkBlank = byte(3) )
const ( DiskWriteBegin int32 = -1 DiskWritePrepare int32 = 0 )
const ( MaxNrCacheForUpdateChunk int = 32 MaxNrWriterForUpdateChunk int = 16 )
const ( RaftInit = 0 RaftFollower = 1 RaftCandidate = 2 RaftLeader = 3 RaftReplyOk = int32(api.Reply_Ok) RaftReplyFail = int32(api.Reply_Fail) RaftReplyNotLeader = int32(api.Reply_NotLeader) RaftReplyTimeout = int32(api.Reply_Timeout) RaftReplyContinue = int32(api.Reply_Continue) RaftReplyMismatchVer = int32(api.Reply_MismatchVer) RaftReplyRetry = int32(api.Reply_Retry) RaftReplyVoting = int32(api.Reply_Voting) RaftReplyNoGroup = int32(api.Reply_NoGroup) RaftReplyExt = int32(api.Reply_Ext) )
const ( AppendEntryCommandLogBaseSize = int32(crc32.Size + 7) AppendEntryCommandLogSize = AppendEntryCommandLogBaseSize + int32(AppendEntryExtLogCmdLength) AppendEntryExtLogCmdLength = uint8(28) DataCmdIdBit = uint16(1 << 15) AppendEntryNoOpCmdId = uint16(0) AppendEntryAddServerCmdId = uint16(1) AppendEntryRemoveServerCmdId = uint16(2) AppendEntryCommitTxCmdId = uint16(3) AppendEntryResetExtLogCmdId = uint16(4) AppendEntryFillChunkCmdId = DataCmdIdBit | uint16(1) AppendEntryUpdateChunkCmdId = DataCmdIdBit | uint16(2) AppendEntryUpdateMetaCmdId = DataCmdIdBit | uint16(3) AppendEntryCommitChunkCmdId = DataCmdIdBit | uint16(4) AppendEntryAbortTxCmdId = DataCmdIdBit | uint16(5) AppendEntryPersistChunkCmdId = DataCmdIdBit | uint16(6) AppendEntryBeginPersistCmdId = DataCmdIdBit | uint16(7) AppendEntryInitNodeListCmdId = DataCmdIdBit | uint16(8) AppendEntryUpdateNodeListCmdId = DataCmdIdBit | uint16(9) AppendEntryUpdateMetaKeyCmdId = DataCmdIdBit | uint16(10) AppendEntryCreateMetaCmdId = DataCmdIdBit | uint16(11) AppendEntryDeleteMetaCmdId = DataCmdIdBit | uint16(12) AppendEntryUpdateParentMetaCmdId = DataCmdIdBit | uint16(13) AppendEntryAddInodeFileMapCmdId = DataCmdIdBit | uint16(14) AppendEntryDropLRUChunksCmdId = DataCmdIdBit | uint16(15) AppendEntryCreateChunkCmdId = DataCmdIdBit | uint16(16) AppendEntryUpdateMetaAttrCmdId = DataCmdIdBit | uint16(17) AppendEntryDeleteInodeFileMapCmdId = DataCmdIdBit | uint16(18) AppendEntryRemoveNonDirtyChunksCmdId = DataCmdIdBit | uint16(19) AppendEntryForgetAllDirtyLogCmdId = DataCmdIdBit | uint16(20) AppendEntryRecordMigratedAddMetaCmdId = DataCmdIdBit | uint16(21) AppendEntryRecordMigratedRemoveMetaCmdId = DataCmdIdBit | uint16(22) AppendEntryRecordMigratedAddChunkCmdId = DataCmdIdBit | uint16(23) AppendEntryRecordMigratedRemoveChunkCmdId = DataCmdIdBit | uint16(24) AppendEntryTruncateCoordinatorCmdId = DataCmdIdBit | uint16(25) AppendEntryFlushCoordinatorCmdId = DataCmdIdBit | uint16(26) AppendEntryHardLinkCoordinatorCmdId = DataCmdIdBit | uint16(27) AppendEntryPersistCoordinatorCmdId = DataCmdIdBit | uint16(28) AppendEntryDeletePersistCoordinatorCmdId = DataCmdIdBit | uint16(29) AppendEntryUpdateNodeListCoordinatorCmdId = DataCmdIdBit | uint16(30) AppendEntryCreateCoordinatorCmdId = DataCmdIdBit | uint16(31) AppendEntryRenameCoordinatorCmdId = DataCmdIdBit | uint16(32) AppendEntryDeleteCoordinatorCmdId = DataCmdIdBit | uint16(33) AppendEntryCompactLogCoordinatorCmdId = DataCmdIdBit | uint16(34) )
const ( SizeOfUint32 = unsafe.Sizeof(uint32(0)) SizeOfUint64 = unsafe.Sizeof(uint64(0)) )
const ( AppendEntriesCmdId = uint8(1) AppendEntriesResponseCmdId = uint8(2) RequestVoteCmdId = uint8(3) RequestVoteResponseCmdId = uint8(4) ExecProtoBufCmdId = uint8(5) ExecProtoBufResponseCmdId = uint8(6) )
CmdIds for RpcMsg NoOpCmdId = uint16(0)
const ( RpcMsgMaxLength = int32(32) RpcControlHeaderLength = int32(3) RpcOptControlHeaderLength = int32(8) RequestVotePayloadSize = uint8(20) RequestVoteResponsePayloadSize = uint8(9) ExecProtoBufPayloadSize = uint8(10) AppendEntriesResponsePayloadSize = uint8(17) AppendEntryPayloadSize = uint8(28) )
const ( RpcGetMetaCmdId = uint16(1) RpcReadChunkCmdId = uint16(2) RpcPrefetchChunkCmdId = uint16(3) RpcRestoreDirtyMetasCmdId = uint16(4) RpcGetApiIpAndPortCmdId = uint16(5) RpcUpdateMetaAttrCmdId = uint16(6) RpcUpdateChunkCmdId = DataCmdIdBit | uint16(10) RpcRestoreDirtyChunksCmdId = DataCmdIdBit | uint16(11) RpcCommitParticipantCmdId = uint16(20) RpcAbortParticipantCmdId = uint16(21) RpcCreateMetaCmdId = uint16(30) RpcTruncateMetaCmdId = uint16(31) RpcUpdateMetaSizeCmdId = uint16(32) RpcDeleteMetaCmdId = uint16(33) RpcUnlinkMetaCmdId = uint16(34) RpcRenameMetaCmdId = uint16(35) RpcCommitUpdateChunkCmdId = uint16(36) RpcCommitDeleteChunkCmdId = uint16(37) RpcCommitExpandChunkCmdId = uint16(38) RpcCommitPersistChunkCmdId = uint16(39) RpcUpdateNodeListCmdId = uint16(40) RpcFillNodeListCmdId = uint16(41) RpcMpuAddCmdId = uint16(42) RpcJoinMigrationCmdId = uint16(43) RpcLeaveMigrationCmdId = uint16(44) RpcCreateChildMetaCmdId = uint16(45) RpcUpdateMetaKeyCmdId = uint16(46) RpcCoordinatorUpdateNodeListCmdId = uint16(50) RpcCoordinatorFlushObjectCmdId = uint16(51) RpcCoordinatorTruncateObjectCmdId = uint16(52) RpcCoordinatorDeleteObjectCmdId = uint16(53) RpcCoordinatorHardLinkObjectCmdId = uint16(54) RpcCoordinatorRenameObjectCmdId = uint16(55) RpcCoordinatorCreateObjectCmdId = uint16(56) RpcCoordinatorPersistCmdId = uint16(57) RpcCoordinatorDeletePersistCmdId = uint16(58) )
AppendEntryHeartBeatCmdId = uint16(0)
const ( TxUpdateMeta = 0 TxUpdateChunk = 1 TxDeleteChunk = 2 TxUpdateNodeList = 3 TxUpdateMetaKey = 4 TxDeleteMeta = 5 TxCreateMeta = 6 TxUpdateParentMeta = 7 TxUpdateCoordinator = 30 TxDeleteCoordinator = 31 TxBeginPersistCoordinator = 32 TxPersistCoordinator = 33 TxDeletePersistCoordinator = 34 TxUpdateNodeListCoordinator = 35 TxCreateCoordinator = 36 TxRenameCoordinator = 37 TxTruncateCoordinator = 38 )
const ( ObjCacheReplyErrBase = RaftReplyExt + 0 ObjCacheReplySuspending = ObjCacheReplyErrBase + 1 ObjCacheIsNotDirty = ObjCacheReplyErrBase + 2 FuseReplyErrBase = RaftReplyExt + 10 )
const INIT_ERR_BLOB = "mount.err"
const ObjcacheDirName = ".objcache"
const (
OnDiskStateReset = uint32(math.MaxUint32)
)
const TrackerNodeKey = InodeKeyType(math.MaxUint64)
Variables ¶
var AccessLinkHead = Chunk{}
var AccessLinkLock sync.Mutex
var CoordinatorOpMap = map[uint16]func(RpcMsg) (CoordinatorOpBase, uint64, int32){ RpcCoordinatorUpdateNodeListCmdId: NewCoordinatorUpdateNodeListOpFromMsg, RpcCoordinatorFlushObjectCmdId: NewCoordinatorFlushObjectOpFromMsg, RpcCoordinatorTruncateObjectCmdId: NewCoordinatorTruncateObjectOpFromMsg, RpcCoordinatorDeleteObjectCmdId: NewCoordinatorDeleteObjectOpFromMsg, RpcCoordinatorHardLinkObjectCmdId: NewCoordinatorHardLinkOpFromMsg, RpcCoordinatorRenameObjectCmdId: NewCoordinatorRenameObjectOpFromMsg, RpcCoordinatorCreateObjectCmdId: NewCoordinatorCreateObjectOpFromMsg, RpcCoordinatorPersistCmdId: NewCoordinatorPersistOpFromMsg, RpcCoordinatorDeletePersistCmdId: NewCoordinatorDeletePersistOpFromMsg, }
var MaxTime = time.Unix(1<<63-62135596801, 999999999)
var PageSize = int64(os.Getpagesize())
var ParticipantOpMap = map[uint16]func(RpcMsg) (ParticipantOp, uint64, int32){ RpcCommitParticipantCmdId: NewCommitParticipantOpFromMsg, RpcAbortParticipantCmdId: NewAbortParticipantOpFromMsg, RpcCreateMetaCmdId: NewCreateMetaOpFromMsg, RpcTruncateMetaCmdId: NewTruncateMetaOpFromMsg, RpcUpdateMetaSizeCmdId: NewUpdateMetaSizeOpFromMsg, RpcDeleteMetaCmdId: NewDeleteMetaOpFromMsg, RpcUnlinkMetaCmdId: NewUnlinkMetaOpFromMsg, RpcRenameMetaCmdId: NewRenameMetaOpFromMsg, RpcCommitUpdateChunkCmdId: NewCommitUpdateChunkOpFromMsg, RpcCommitDeleteChunkCmdId: NewCommitDeleteChunkOpFromMsg, RpcCommitExpandChunkCmdId: NewCommitExpandChunkOpFromMsg, RpcCommitPersistChunkCmdId: NewCommitPersistChunkOpFromMsg, RpcUpdateNodeListCmdId: NewUpdateNodeListOpFromMsg, RpcFillNodeListCmdId: NewFillNodeListOpFromMsg, RpcMpuAddCmdId: NewMpuAddOpFromMsg, RpcJoinMigrationCmdId: NewJoinMigrationOpFromMsg, RpcLeaveMigrationCmdId: NewLeaveMigrationOpFromMsg, RpcCreateChildMetaCmdId: NewCreateChildMetaOpFromMsg, RpcUpdateMetaKeyCmdId: NewUpdateMetaKeyOpFromMsg, }
var RandString = MyRandString{/* contains filtered or unexported fields */}
var SectorSize = 512
var SingleShotOpMap = map[uint16]func(RpcMsg) (SingleShotOp, uint64, int32){ RpcGetMetaCmdId: NewGetMetaOpFromMsg, RpcReadChunkCmdId: NewReadChunkOpFromMsg, RpcPrefetchChunkCmdId: NewPrefetchChunkOpFromMsg, RpcRestoreDirtyMetasCmdId: NewRestoreDirtyMetaOpFromMsg, RpcGetApiIpAndPortCmdId: NewGetApiIpAndPortOpFromMsg, RpcUpdateMetaAttrCmdId: NewUpdateMetaAttrOpFromMsg, }
var TotalDown int32
var TotalUp int32
Functions ¶
func AwsErrToReply ¶
func CalculateBufferLengthForDownload ¶
func CalculateBufferLengthForDownload(h MetaRWHandler, offset int64) int
func CollectLRUChunks ¶
func CollectLRUChunks(dirtyMgr *DirtyMgr, raft *RaftInstance, reclaimDiskBytes int64) (keys []uint64, offsets []int64)
func CollectLRUDirtyKeys ¶
func CollectLRUDirtyKeys(dirtyMgr *DirtyMgr, raft *RaftInstance, reclaimDiskBytes int64) (keys map[InodeKeyType]bool)
func ErrnoToReply ¶
func GetAddrInet4FromString ¶
func GetAddrInet4FromString(headWorkerAddr string, headWorkerPort int) (common.NodeAddrInet4, error)
func GetBufCheckSum ¶
func GetGroupForChunk ¶
func GetGroupForMeta ¶
func GetGroupForMeta(ring *hashring.HashRing, inodeKey InodeKeyType) (groupId string, ok bool)
func GetServerConfig ¶
func GetServerConfig(args *common.ObjcacheCmdlineArgs, timeout time.Duration) (common.ObjcacheConfig, error)
func HttpErrToReply ¶
func InitAccessLinkHead ¶
func InitAccessLinkHead()
func InitMemoryPool ¶
func InitMemoryPool()
func MyHashFunc ¶
func MyHashFunc64 ¶
func MyHashFunc64V2 ¶
func MyHashFuncV2 ¶
func NewAppendCommitUpdateChunkMsg ¶
func NewAppendCommitUpdateChunkMsg(meta *WorkingMeta, chunks map[int64]*WorkingChunk, isDelete bool) *common.AppendCommitUpdateChunksMsg
func NewNodeMsgFromAddr ¶
func NewNodeMsgFromAddr(addr common.NodeAddrInet4) *common.NodeMsg
func NewSaFromApiNodeMsg ¶
func NewSaFromApiNodeMsg(msg *api.ApiNodeMsg) (ret common.NodeAddrInet4)
func NewSaFromNodeMsg ¶
func NewSaFromNodeMsg(msg *common.NodeMsg) (ret common.NodeAddrInet4)
func NewUpdateParentRetFromMsg ¶
func NewUpdateParentRetFromMsg(msg *common.UpdateParentRetMsg) (UpdateParentRet, RaftBasicReply)
func PrepareCommitUpdateChunkBody ¶
func PrepareCommitUpdateChunkBody(inodeMgr *InodeMgr, offStags map[int64][]*common.StagingChunkMsg, newMeta *WorkingMeta) (chunks map[int64]*WorkingChunk, unlocks []func())
func ProfilerThread ¶
func ReadDataToBuffer ¶
func ReadDataToBuffer(fd int, msg *RpcMsg, r *ReadRpcMsgState, data []byte)
func ReadDataToFd ¶
func ReadDataToFd(fd int, msg *RpcMsg, r *ReadRpcMsgState, toFd int, pipeFds [2]int)
func ReadDataToRaftLog ¶
func ReadDataToRaftLog(fd int, msg *RpcMsg, r *ReadRpcMsgState, extLogger *OnDiskLogger, pipeFds [2]int)
ReadDataToRaftLog Note: msg must be already filled by ReadRpcMsg
func ReadRpcMsg ¶
func ReadRpcMsg(fd int, msg *RpcMsg, r *ReadRpcMsgState)
func ReplyToFuseErr ¶
func ReturnPageBuffer ¶
func ReturnPageBuffer(buf *PageBuffer)
Types ¶
type AbortParticipantOp ¶
type AbortParticipantOp struct {
// contains filtered or unexported fields
}
func NewAbortParticipantOp ¶
func (AbortParticipantOp) GetCaller ¶
func (o AbortParticipantOp) GetCaller(n *NodeServer) RpcCaller
func (AbortParticipantOp) GetLeader ¶
func (o AbortParticipantOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (AbortParticipantOp) GetTxId ¶
func (o AbortParticipantOp) GetTxId() TxId
func (AbortParticipantOp) RetToMsg ¶
func (o AbortParticipantOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type AbortTxCommand ¶
type AbortTxCommand struct {
// contains filtered or unexported fields
}
func NewAbortTxCommand ¶
func NewAbortTxCommand(txIds []TxId) AbortTxCommand
func (AbortTxCommand) Commit ¶
func (c AbortTxCommand) Commit(n *NodeServer)
func (AbortTxCommand) GetExtCmdId ¶
func (c AbortTxCommand) GetExtCmdId() uint16
func (AbortTxCommand) GetTxId ¶
func (c AbortTxCommand) GetTxId() TxId
func (AbortTxCommand) IsSingleShot ¶
func (c AbortTxCommand) IsSingleShot() bool
func (AbortTxCommand) NeedTwoPhaseCommit ¶
func (c AbortTxCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type AddInodeFileMapCommand ¶
type AddInodeFileMapCommand struct {
// contains filtered or unexported fields
}
func NewAddInodeFileMapCommand ¶
func NewAddInodeFileMapCommand(working *WorkingMeta, children map[string]InodeKeyType, key string) AddInodeFileMapCommand
func (AddInodeFileMapCommand) Commit ¶
func (c AddInodeFileMapCommand) Commit(n *NodeServer)
func (AddInodeFileMapCommand) GetExtCmdId ¶
func (c AddInodeFileMapCommand) GetExtCmdId() uint16
func (AddInodeFileMapCommand) GetTxId ¶
func (c AddInodeFileMapCommand) GetTxId() TxId
func (AddInodeFileMapCommand) IsSingleShot ¶
func (c AddInodeFileMapCommand) IsSingleShot() bool
func (AddInodeFileMapCommand) NeedTwoPhaseCommit ¶
func (c AddInodeFileMapCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type AddServerCommand ¶
type AddServerCommand struct {
// contains filtered or unexported fields
}
func NewAddServerCommand ¶
func NewAddServerCommand(serverId uint32, ip [4]byte, port uint16) AddServerCommand
func (AddServerCommand) Apply ¶
func (c AddServerCommand) Apply(n *NodeServer, _ ExtLogCommandImpl)
func (AddServerCommand) GetCmdId ¶
func (c AddServerCommand) GetCmdId() uint16
func (AddServerCommand) GetExtPayloadSize ¶
func (c AddServerCommand) GetExtPayloadSize() uint8
func (AddServerCommand) SetExtPayload ¶
func (c AddServerCommand) SetExtPayload(extPayload []byte)
type AppendEntryCommand ¶
type AppendEntryCommand struct {
// contains filtered or unexported fields
}
func GetAppendEntryCommand ¶
func GetAppendEntryCommand(term uint32, rc RaftCommand) (cmd AppendEntryCommand)
func (*AppendEntryCommand) AppendToRpcMsg ¶
func (l *AppendEntryCommand) AppendToRpcMsg(d *RpcMsg) (newOptHeaderLength uint16, newTotalExtLogSize uint32)
func (*AppendEntryCommand) AsRaftCommand ¶
func (l *AppendEntryCommand) AsRaftCommand() (RaftCommand, bool)
func (*AppendEntryCommand) GetChecksum ¶
func (l *AppendEntryCommand) GetChecksum() []byte
func (*AppendEntryCommand) GetEntryLength ¶
func (l *AppendEntryCommand) GetEntryLength() uint8
func (*AppendEntryCommand) GetExtCmdId ¶
func (l *AppendEntryCommand) GetExtCmdId() uint16
func (*AppendEntryCommand) GetExtPayload ¶
func (l *AppendEntryCommand) GetExtPayload() []byte
func (*AppendEntryCommand) GetTerm ¶
func (l *AppendEntryCommand) GetTerm() uint32
type BeginPersistCommand ¶
type BeginPersistCommand struct {
// contains filtered or unexported fields
}
func NewBeginPersistCommand ¶
func NewBeginPersistCommand(txId TxId, keys []string, uploadIds []string) BeginPersistCommand
func (BeginPersistCommand) Commit ¶
func (c BeginPersistCommand) Commit(n *NodeServer)
func (BeginPersistCommand) GetExtCmdId ¶
func (c BeginPersistCommand) GetExtCmdId() uint16
func (BeginPersistCommand) GetTxId ¶
func (c BeginPersistCommand) GetTxId() TxId
func (BeginPersistCommand) IsSingleShot ¶
func (c BeginPersistCommand) IsSingleShot() bool
func (BeginPersistCommand) NeedTwoPhaseCommit ¶
func (c BeginPersistCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
func (BeginPersistCommand) RemoteCommit ¶
func (c BeginPersistCommand) RemoteCommit(*RaftGroupMgr) []ParticipantOp
type BlobItemOutput ¶
type BlobPrefixOutput ¶
type BlobPrefixOutput struct {
Prefix *string
}
type BucketCredential ¶
type BucketCredential struct { DirName string `yaml:"dirName"` BucketName string `yaml:"bucketName"` BackendName string `yaml:"backendName"` Endpoint string `yaml:"endpoint"` AccessKey string `yaml:"accessKey"` SecretKey string `yaml:"secretKey"` TestFile string `yaml:"testFile"` Anonymous bool `yaml:"anonymous"` }
type BucketCredentials ¶
type BucketCredentials struct {
Buckets []BucketCredential `yaml:"buckets"`
}
type BucketSpec ¶
type BucketSpec struct {
// contains filtered or unexported fields
}
type BufferedDiskPageReader ¶
type BufferedDiskPageReader struct {
// contains filtered or unexported fields
}
*
- Buffer layout:
- bf o <------ dataLen ------>
- ----|------|------------------------|
- <- al ->
- <------------ len(buf.Buf) ----->
- original request is (offset o, dataLen) but we need to align SectorSize for offset and size.
- BufferedDiskPageReader must still return the range [o, o + dataLen] regardless of reading more than it.
- bf: bufLogOffset is calculated by offset o and dataLen at prepareBuffer, aligned to be a multiple of SectorSize
- al: alignLeft to align offset to be a multiple of SectorSize
func NewBufferedDiskPageReaderFromStag ¶
func NewBufferedDiskPageReaderFromStag(page *PageBuffer, logId LogIdType, logOffset int64, dataLen int64) *BufferedDiskPageReader
func (*BufferedDiskPageReader) GetSlicedPageBufferAt ¶
func (r *BufferedDiskPageReader) GetSlicedPageBufferAt(stagPart *StagingChunkPart, offset int64, dec func(interface{})) (SlicedPageBuffer, error)
GetSlicedPageBufferAt returns slice of Buf with ref count incremented. user must call .Release() later.
type Capabilities ¶
type Chunk ¶
type Chunk struct {
// contains filtered or unexported fields
}
func CreateNewChunk ¶
func CreateNewChunk(inodeKey InodeKeyType, offset int64, chunkIdx uint32) *Chunk
func (*Chunk) AddWorkingChunk ¶
func (c *Chunk) AddWorkingChunk(inodeMgr *InodeMgr, working *WorkingChunk, prev *WorkingChunk)
func (*Chunk) DeleteFromLRUListNoLock ¶
func (c *Chunk) DeleteFromLRUListNoLock()
func (*Chunk) Drop ¶
func (c *Chunk) Drop(inodeMgr *InodeMgr, raft *RaftInstance)
func (*Chunk) GetWorkingChunk ¶
func (c *Chunk) GetWorkingChunk(ver uint32, updateLRU bool) (*WorkingChunk, error)
func (*Chunk) NewWorkingChunk ¶
func (c *Chunk) NewWorkingChunk(chunkVer uint32) *WorkingChunk
func (*Chunk) UpdateLRUList ¶
func (c *Chunk) UpdateLRUList()
type ChunkReader ¶
type ChunkReader struct {
// contains filtered or unexported fields
}
ChunkReader must hold lock for stags
func (*ChunkReader) Close ¶
func (r *ChunkReader) Close() (err error)
func (*ChunkReader) GetBufferZeroCopy ¶
func (r *ChunkReader) GetBufferZeroCopy(size int) (bufs []SlicedPageBuffer, count int, err error)
func (*ChunkReader) GetLen ¶
func (r *ChunkReader) GetLen() (int64, error)
func (*ChunkReader) HasLen ¶
func (r *ChunkReader) HasLen() (int, bool)
func (*ChunkReader) IsSeeker ¶
func (r *ChunkReader) IsSeeker() bool
type CommitAbortRpcCaller ¶
type CommitAbortRpcCaller struct {
// contains filtered or unexported fields
}
func NewCommitAbortRpcCaller ¶
func NewCommitAbortRpcCaller(fn ParticipantOp, remoteTimeout time.Duration, nodeLock bool) CommitAbortRpcCaller
func (CommitAbortRpcCaller) ExecLocal ¶
func (c CommitAbortRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CommitAbortRpcCaller) ExecLocalInRpc ¶
func (c CommitAbortRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CommitAbortRpcCaller) ExecRemote ¶
func (c CommitAbortRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CommitAbortRpcCaller) GetLeader ¶
func (c CommitAbortRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
func (CommitAbortRpcCaller) TryNext ¶
func (c CommitAbortRpcCaller) TryNext(n *NodeServer, i int) bool
type CommitChunkCommand ¶
type CommitChunkCommand struct {
// contains filtered or unexported fields
}
func NewCommitChunkCommand ¶
func NewCommitChunkCommand(meta *WorkingMeta, chunks map[int64]*WorkingChunk, isDelete bool) CommitChunkCommand
func (CommitChunkCommand) Commit ¶
func (c CommitChunkCommand) Commit(n *NodeServer)
func (CommitChunkCommand) GetExtCmdId ¶
func (c CommitChunkCommand) GetExtCmdId() uint16
func (CommitChunkCommand) GetTxId ¶
func (c CommitChunkCommand) GetTxId() TxId
func (CommitChunkCommand) IsSingleShot ¶
func (c CommitChunkCommand) IsSingleShot() bool
func (CommitChunkCommand) NeedTwoPhaseCommit ¶
func (c CommitChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type CommitChunkRpcCaller ¶
type CommitChunkRpcCaller struct {
// contains filtered or unexported fields
}
func NewCommitChunkRpcCaller ¶
func NewCommitChunkRpcCaller(fn ParticipantOp, remoteTimeout time.Duration) CommitChunkRpcCaller
func (CommitChunkRpcCaller) ExecLocal ¶
func (c CommitChunkRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CommitChunkRpcCaller) ExecLocalInRpc ¶
func (c CommitChunkRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CommitChunkRpcCaller) ExecRemote ¶
func (c CommitChunkRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CommitChunkRpcCaller) GetLeader ¶
func (c CommitChunkRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
func (CommitChunkRpcCaller) TryNext ¶
func (c CommitChunkRpcCaller) TryNext(n *NodeServer, i int) bool
type CommitCommand ¶
type CommitCommand struct {
// contains filtered or unexported fields
}
func NewCommitCommand ¶
func NewCommitCommand(txId TxId) CommitCommand
func (CommitCommand) Apply ¶
func (c CommitCommand) Apply(n *NodeServer, _ ExtLogCommandImpl)
func (CommitCommand) GetCmdId ¶
func (c CommitCommand) GetCmdId() uint16
func (CommitCommand) GetExtPayloadSize ¶
func (c CommitCommand) GetExtPayloadSize() uint8
func (CommitCommand) SetExtPayload ¶
func (c CommitCommand) SetExtPayload(extPayload []byte)
type CommitDeleteChunkOp ¶
type CommitDeleteChunkOp struct {
// contains filtered or unexported fields
}
func NewCommitDeleteChunkOp ¶
func NewCommitDeleteChunkOp(txId TxId, newMeta *WorkingMeta, offset int64, deleteLen int64) CommitDeleteChunkOp
func (CommitDeleteChunkOp) GetCaller ¶
func (o CommitDeleteChunkOp) GetCaller(n *NodeServer) RpcCaller
func (CommitDeleteChunkOp) GetLeader ¶
func (o CommitDeleteChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CommitDeleteChunkOp) GetTxId ¶
func (o CommitDeleteChunkOp) GetTxId() TxId
func (CommitDeleteChunkOp) RetToMsg ¶
func (o CommitDeleteChunkOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type CommitExpandChunkOp ¶
type CommitExpandChunkOp struct {
// contains filtered or unexported fields
}
func NewCommitExpandChunkOp ¶
func NewCommitExpandChunkOp(txId TxId, newMeta *WorkingMeta, offset int64, expandLen int64) CommitExpandChunkOp
func (CommitExpandChunkOp) GetCaller ¶
func (o CommitExpandChunkOp) GetCaller(n *NodeServer) RpcCaller
func (CommitExpandChunkOp) GetLeader ¶
func (o CommitExpandChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CommitExpandChunkOp) GetTxId ¶
func (o CommitExpandChunkOp) GetTxId() TxId
func (CommitExpandChunkOp) RetToMsg ¶
func (o CommitExpandChunkOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type CommitParticipantOp ¶
type CommitParticipantOp struct {
// contains filtered or unexported fields
}
func NewCommitParticipantOp ¶
func NewCommitParticipantOp(rpcSeqNum TxId, commitTxId TxId, groupId string) CommitParticipantOp
func NewCommitParticipantOpForUpdateNode ¶
func NewCommitParticipantOpForUpdateNode(rpcSeqNum TxId, commitTxId TxId, node RaftNode) CommitParticipantOp
func (CommitParticipantOp) GetCaller ¶
func (o CommitParticipantOp) GetCaller(n *NodeServer) RpcCaller
func (CommitParticipantOp) GetLeader ¶
func (o CommitParticipantOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CommitParticipantOp) GetTxId ¶
func (o CommitParticipantOp) GetTxId() TxId
func (CommitParticipantOp) RetToMsg ¶
func (o CommitParticipantOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type CommitPersistChunkOp ¶
type CommitPersistChunkOp struct {
// contains filtered or unexported fields
}
func NewCommitPersistChunkOp ¶
func NewCommitPersistChunkOp(txId TxId, commitTxId TxId, groupId string, offsets []int64, cVers []uint32, inodeKey InodeKeyType) CommitPersistChunkOp
func (CommitPersistChunkOp) GetCaller ¶
func (o CommitPersistChunkOp) GetCaller(n *NodeServer) RpcCaller
func (CommitPersistChunkOp) GetLeader ¶
func (o CommitPersistChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CommitPersistChunkOp) GetTxId ¶
func (o CommitPersistChunkOp) GetTxId() TxId
func (CommitPersistChunkOp) RetToMsg ¶
func (o CommitPersistChunkOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type CommitUpdateChunkOp ¶
type CommitUpdateChunkOp struct {
// contains filtered or unexported fields
}
func NewCommitUpdateChunkOp ¶
func NewCommitUpdateChunkOp(txId TxId, record *common.UpdateChunkRecordMsg, newMeta *WorkingMeta) CommitUpdateChunkOp
func (CommitUpdateChunkOp) GetCaller ¶
func (o CommitUpdateChunkOp) GetCaller(n *NodeServer) RpcCaller
func (CommitUpdateChunkOp) GetLeader ¶
func (o CommitUpdateChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CommitUpdateChunkOp) GetTxId ¶
func (o CommitUpdateChunkOp) GetTxId() TxId
func (CommitUpdateChunkOp) RetToMsg ¶
func (o CommitUpdateChunkOp) RetToMsg(_ interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type CompactLogCoordinatorCommand ¶
type CompactLogCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewCompactLogCoordinatorCommand ¶
func NewCompactLogCoordinatorCommand(s *Snapshot) CompactLogCoordinatorCommand
func (CompactLogCoordinatorCommand) Commit ¶
func (c CompactLogCoordinatorCommand) Commit(n *NodeServer)
func (CompactLogCoordinatorCommand) GetExtCmdId ¶
func (c CompactLogCoordinatorCommand) GetExtCmdId() uint16
func (CompactLogCoordinatorCommand) GetTxId ¶
func (c CompactLogCoordinatorCommand) GetTxId() TxId
func (CompactLogCoordinatorCommand) IsSingleShot ¶
func (c CompactLogCoordinatorCommand) IsSingleShot() bool
func (CompactLogCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c CompactLogCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
func (CompactLogCoordinatorCommand) RemoteCommit ¶
func (c CompactLogCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
type CoordinatorCommand ¶
type CoordinatorCommand interface { RemoteCommit(raftGroup *RaftGroupMgr) []ParticipantOp ExtLogCommandImpl }
type CoordinatorCompactLogOp ¶
type CoordinatorCompactLogOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorCompactLogOp ¶
func NewCoordinatorCompactLogOp(id CoordinatorId) CoordinatorCompactLogOp
func (CoordinatorCompactLogOp) GetCaller ¶
func (o CoordinatorCompactLogOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorCompactLogOp) GetLeader ¶
func (o CoordinatorCompactLogOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorCompactLogOp) GetTxId ¶
func (o CoordinatorCompactLogOp) GetTxId() TxId
func (CoordinatorCompactLogOp) RetToMsg ¶
func (o CoordinatorCompactLogOp) RetToMsg(_ interface{}, r RaftBasicReply) proto.Message
type CoordinatorCreateObjectOp ¶
type CoordinatorCreateObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorCreateObjectOp ¶
func NewCoordinatorCreateObjectOp(id CoordinatorId, parentFullPath string, parentInodeKey InodeKeyType, childName string, childInodeKey InodeKeyType, mode uint32, chunkSize int64, expireMs int32) CoordinatorCreateObjectOp
func (CoordinatorCreateObjectOp) GetCaller ¶
func (o CoordinatorCreateObjectOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorCreateObjectOp) GetLeader ¶
func (o CoordinatorCreateObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorCreateObjectOp) GetTxId ¶
func (o CoordinatorCreateObjectOp) GetTxId() TxId
func (CoordinatorCreateObjectOp) RetToMsg ¶
func (o CoordinatorCreateObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorDeleteObjectOp ¶
type CoordinatorDeleteObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorDeleteObjectOp ¶
func NewCoordinatorDeleteObjectOp(id CoordinatorId, parentFullPath string, parentInodeKey InodeKeyType, childName string, childInodeKey InodeKeyType) CoordinatorDeleteObjectOp
func (CoordinatorDeleteObjectOp) GetCaller ¶
func (o CoordinatorDeleteObjectOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorDeleteObjectOp) GetLeader ¶
func (o CoordinatorDeleteObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorDeleteObjectOp) GetTxId ¶
func (o CoordinatorDeleteObjectOp) GetTxId() TxId
func (CoordinatorDeleteObjectOp) RetToMsg ¶
func (o CoordinatorDeleteObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorDeletePersistOp ¶
type CoordinatorDeletePersistOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorDeletePersistOp ¶
func NewCoordinatorDeletePersistOp(id CoordinatorId, key string, inodeKey InodeKeyType, priority int) CoordinatorDeletePersistOp
func (CoordinatorDeletePersistOp) GetCaller ¶
func (o CoordinatorDeletePersistOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorDeletePersistOp) GetLeader ¶
func (o CoordinatorDeletePersistOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorDeletePersistOp) GetTxId ¶
func (o CoordinatorDeletePersistOp) GetTxId() TxId
func (CoordinatorDeletePersistOp) RetToMsg ¶
func (o CoordinatorDeletePersistOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorFlushObjectOp ¶
type CoordinatorFlushObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorFlushObjectOp ¶
func NewCoordinatorFlushObjectOp(id CoordinatorId, inodeKey InodeKeyType, records []*common.UpdateChunkRecordMsg, mTime int64, mode uint32) CoordinatorFlushObjectOp
func (CoordinatorFlushObjectOp) GetCaller ¶
func (o CoordinatorFlushObjectOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorFlushObjectOp) GetLeader ¶
func (o CoordinatorFlushObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorFlushObjectOp) GetTxId ¶
func (o CoordinatorFlushObjectOp) GetTxId() TxId
func (CoordinatorFlushObjectOp) RetToMsg ¶
func (o CoordinatorFlushObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorHardLinkOp ¶
type CoordinatorHardLinkOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorHardLinkOp ¶
func NewCoordinatorHardLinkOp(id CoordinatorId, srcInodeKey InodeKeyType, srcParentInodeKey InodeKeyType, dstParentKey string, dstParentInodeKey InodeKeyType, dstName string, childInodeKey InodeKeyType) CoordinatorHardLinkOp
func (CoordinatorHardLinkOp) GetCaller ¶
func (o CoordinatorHardLinkOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorHardLinkOp) GetLeader ¶
func (o CoordinatorHardLinkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorHardLinkOp) GetTxId ¶
func (o CoordinatorHardLinkOp) GetTxId() TxId
func (CoordinatorHardLinkOp) RetToMsg ¶
func (o CoordinatorHardLinkOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorId ¶
type CoordinatorId struct {
// contains filtered or unexported fields
}
func NewCoordinatorIdFromMsg ¶
func NewCoordinatorIdFromMsg(msg *common.CoordinatorIdMsg) CoordinatorId
type CoordinatorOpBase ¶
type CoordinatorOpBase interface { GetTxId() TxId GetLeader(*NodeServer, *RaftNodeList) (RaftNode, bool) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message GetCaller(*NodeServer) RpcCaller // contains filtered or unexported methods }
func NewCoordinatorCreateObjectOpFromMsg ¶
func NewCoordinatorCreateObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorDeleteObjectOpFromMsg ¶
func NewCoordinatorDeleteObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorDeletePersistOpFromMsg ¶
func NewCoordinatorDeletePersistOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorFlushObjectOpFromMsg ¶
func NewCoordinatorFlushObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorHardLinkOpFromMsg ¶
func NewCoordinatorHardLinkOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorPersistOpFromMsg ¶
func NewCoordinatorPersistOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorRenameObjectOpFromMsg ¶
func NewCoordinatorRenameObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorTruncateObjectOpFromMsg ¶
func NewCoordinatorTruncateObjectOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
func NewCoordinatorUpdateNodeListOpFromMsg ¶
func NewCoordinatorUpdateNodeListOpFromMsg(msg RpcMsg) (CoordinatorOpBase, uint64, int32)
type CoordinatorPersistOp ¶
type CoordinatorPersistOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorPersistOp ¶
func NewCoordinatorPersistOp(id CoordinatorId, inodeKey InodeKeyType, priority int) CoordinatorPersistOp
func (CoordinatorPersistOp) GetCaller ¶
func (o CoordinatorPersistOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorPersistOp) GetLeader ¶
func (o CoordinatorPersistOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorPersistOp) GetTxId ¶
func (o CoordinatorPersistOp) GetTxId() TxId
func (CoordinatorPersistOp) RetToMsg ¶
func (o CoordinatorPersistOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorRenameObjectOp ¶
type CoordinatorRenameObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorRenameObjectOp ¶
func NewCoordinatorRenameObjectOp(id CoordinatorId, srcParentKey string, srcParentInodeKey InodeKeyType, srcName string, dstParentKey string, dstParentInodeKey InodeKeyType, dstName string, childInodeKey InodeKeyType) CoordinatorRenameObjectOp
func (CoordinatorRenameObjectOp) CheckError ¶
func (o CoordinatorRenameObjectOp) CheckError(unlink UpdateParentRet, link UpdateParentRet) int32
func (CoordinatorRenameObjectOp) GetCaller ¶
func (o CoordinatorRenameObjectOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorRenameObjectOp) GetLeader ¶
func (o CoordinatorRenameObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorRenameObjectOp) GetTxId ¶
func (o CoordinatorRenameObjectOp) GetTxId() TxId
func (CoordinatorRenameObjectOp) RetToMsg ¶
func (o CoordinatorRenameObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorRet ¶
type CoordinatorRet struct {
// contains filtered or unexported fields
}
func NewCoordinatorRetFromMsg ¶
func NewCoordinatorRetFromMsg(msg *common.CoordinatorRetMsg) *CoordinatorRet
type CoordinatorRpcCaller ¶
type CoordinatorRpcCaller struct {
// contains filtered or unexported fields
}
func NewCoordinatorRpcCaller ¶
func NewCoordinatorRpcCaller(fn CoordinatorOpBase, nodeLock bool) CoordinatorRpcCaller
func (CoordinatorRpcCaller) ExecLocal ¶
func (c CoordinatorRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CoordinatorRpcCaller) ExecLocalInRpc ¶
func (c CoordinatorRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CoordinatorRpcCaller) ExecRemote ¶
func (c CoordinatorRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (CoordinatorRpcCaller) GetLeader ¶
func (c CoordinatorRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
func (CoordinatorRpcCaller) TryNext ¶
func (c CoordinatorRpcCaller) TryNext(n *NodeServer, i int) bool
type CoordinatorTruncateObjectOp ¶
type CoordinatorTruncateObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorTruncateObjectOp ¶
func NewCoordinatorTruncateObjectOp(id CoordinatorId, inodeKey InodeKeyType, newSize int64) CoordinatorTruncateObjectOp
func (CoordinatorTruncateObjectOp) GetCaller ¶
func (o CoordinatorTruncateObjectOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorTruncateObjectOp) GetLeader ¶
func (o CoordinatorTruncateObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CoordinatorTruncateObjectOp) GetTxId ¶
func (o CoordinatorTruncateObjectOp) GetTxId() TxId
func (CoordinatorTruncateObjectOp) RetToMsg ¶
func (o CoordinatorTruncateObjectOp) RetToMsg(ret interface{}, r RaftBasicReply) proto.Message
type CoordinatorUpdateNodeListOp ¶
type CoordinatorUpdateNodeListOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorUpdateNodeListOp ¶
func NewCoordinatorUpdateNodeListOp(id CoordinatorId, trackerNode RaftNode, isAdd bool, target RaftNode, groupAddr map[string]bool, nodeListVer uint64) CoordinatorUpdateNodeListOp
func (CoordinatorUpdateNodeListOp) GetCaller ¶
func (o CoordinatorUpdateNodeListOp) GetCaller(n *NodeServer) RpcCaller
func (CoordinatorUpdateNodeListOp) GetLeader ¶
func (o CoordinatorUpdateNodeListOp) GetLeader(_ *NodeServer, _ *RaftNodeList) (RaftNode, bool)
func (CoordinatorUpdateNodeListOp) GetTxId ¶
func (o CoordinatorUpdateNodeListOp) GetTxId() TxId
func (CoordinatorUpdateNodeListOp) RetToMsg ¶
func (o CoordinatorUpdateNodeListOp) RetToMsg(_ interface{}, r RaftBasicReply) proto.Message
type CopyBlobInput ¶
type CopyBlobOutput ¶
type CopyBlobOutput struct {
RequestId string
}
type CreateChildMetaOp ¶
type CreateChildMetaOp struct {
// contains filtered or unexported fields
}
func NewCreateChildMetaOp ¶
func NewCreateChildMetaOp(txId TxId, inodeKey InodeKeyType, key string, childName string, childInodeKey InodeKeyType, childIsDir bool) CreateChildMetaOp
func (CreateChildMetaOp) GetCaller ¶
func (o CreateChildMetaOp) GetCaller(n *NodeServer) RpcCaller
func (CreateChildMetaOp) GetLeader ¶
func (o CreateChildMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CreateChildMetaOp) GetTxId ¶
func (o CreateChildMetaOp) GetTxId() TxId
func (CreateChildMetaOp) RetToMsg ¶
func (o CreateChildMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type CreateChunkCommand ¶
type CreateChunkCommand struct {
// contains filtered or unexported fields
}
func NewCreateChunkCommand ¶
func NewCreateChunkCommand(inodeKey InodeKeyType, offset int64, version uint32, logOffset int64, length int64, key string, chunkIdx uint32) CreateChunkCommand
func (CreateChunkCommand) Commit ¶
func (c CreateChunkCommand) Commit(n *NodeServer)
func (CreateChunkCommand) GetExtCmdId ¶
func (c CreateChunkCommand) GetExtCmdId() uint16
func (CreateChunkCommand) GetTxId ¶
func (c CreateChunkCommand) GetTxId() TxId
func (CreateChunkCommand) IsSingleShot ¶
func (c CreateChunkCommand) IsSingleShot() bool
func (CreateChunkCommand) NeedTwoPhaseCommit ¶
func (c CreateChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type CreateCoordinatorCommand ¶
type CreateCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewCreateCoordinatorCommand ¶
func NewCreateCoordinatorCommand(txId TxId, newKey string, metaTx TxRet, parentTx TxRet, raftGroup *RaftGroupMgr, commitTxId TxId) CreateCoordinatorCommand
func (CreateCoordinatorCommand) Commit ¶
func (c CreateCoordinatorCommand) Commit(n *NodeServer)
func (CreateCoordinatorCommand) GetExtCmdId ¶
func (c CreateCoordinatorCommand) GetExtCmdId() uint16
func (CreateCoordinatorCommand) GetTxId ¶
func (c CreateCoordinatorCommand) GetTxId() TxId
func (CreateCoordinatorCommand) IsSingleShot ¶
func (c CreateCoordinatorCommand) IsSingleShot() bool
func (CreateCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c CreateCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
func (CreateCoordinatorCommand) RemoteCommit ¶
func (c CreateCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
type CreateMetaCommand ¶
type CreateMetaCommand struct {
// contains filtered or unexported fields
}
func NewCreateMetaCommand ¶
func NewCreateMetaCommand(txId TxId, meta *WorkingMeta, newKey string, parent InodeKeyType) CreateMetaCommand
func (CreateMetaCommand) Commit ¶
func (c CreateMetaCommand) Commit(n *NodeServer)
func (CreateMetaCommand) GetExtCmdId ¶
func (c CreateMetaCommand) GetExtCmdId() uint16
func (CreateMetaCommand) GetTxId ¶
func (c CreateMetaCommand) GetTxId() TxId
func (CreateMetaCommand) IsSingleShot ¶
func (c CreateMetaCommand) IsSingleShot() bool
func (CreateMetaCommand) NeedTwoPhaseCommit ¶
func (c CreateMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type CreateMetaOp ¶
type CreateMetaOp struct {
// contains filtered or unexported fields
}
func NewCreateMetaOp ¶
func NewCreateMetaOp(txId TxId, inodeKey InodeKeyType, parentInodeKey InodeKeyType, newKey string, mode uint32, chunkSize int64, expireMs int32) CreateMetaOp
func (CreateMetaOp) GetCaller ¶
func (o CreateMetaOp) GetCaller(n *NodeServer) RpcCaller
func (CreateMetaOp) GetLeader ¶
func (o CreateMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (CreateMetaOp) GetTxId ¶
func (o CreateMetaOp) GetTxId() TxId
func (CreateMetaOp) RetToMsg ¶
func (o CreateMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type DeleteBlobInput ¶
type DeleteBlobInput struct {
Key string
}
type DeleteBlobOutput ¶
type DeleteBlobOutput struct {
RequestId string
}
type DeleteBlobsInput ¶
type DeleteBlobsInput struct {
Items []string
}
type DeleteBlobsOutput ¶
type DeleteBlobsOutput struct {
RequestId string
}
type DeleteCoordinatorCommand ¶
type DeleteCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewDeleteCoordinatorCommand ¶
func NewDeleteCoordinatorCommand(txId TxId, key string, prevSize int64, metaTx TxRet, parentTx TxRet, raftGroup *RaftGroupMgr, commitTxId TxId) DeleteCoordinatorCommand
func (DeleteCoordinatorCommand) Commit ¶
func (c DeleteCoordinatorCommand) Commit(n *NodeServer)
func (DeleteCoordinatorCommand) GetExtCmdId ¶
func (c DeleteCoordinatorCommand) GetExtCmdId() uint16
func (DeleteCoordinatorCommand) GetTxId ¶
func (c DeleteCoordinatorCommand) GetTxId() TxId
func (DeleteCoordinatorCommand) IsSingleShot ¶
func (c DeleteCoordinatorCommand) IsSingleShot() bool
func (DeleteCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c DeleteCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
func (DeleteCoordinatorCommand) RemoteCommit ¶
func (c DeleteCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
type DeleteInodeFileMapCommand ¶
type DeleteInodeFileMapCommand struct {
// contains filtered or unexported fields
}
func NewDeleteInodeFileMapCommand ¶
func NewDeleteInodeFileMapCommand(inodeKeys []uint64, keys []string) DeleteInodeFileMapCommand
func (DeleteInodeFileMapCommand) Commit ¶
func (c DeleteInodeFileMapCommand) Commit(n *NodeServer)
func (DeleteInodeFileMapCommand) GetExtCmdId ¶
func (c DeleteInodeFileMapCommand) GetExtCmdId() uint16
func (DeleteInodeFileMapCommand) GetTxId ¶
func (c DeleteInodeFileMapCommand) GetTxId() TxId
func (DeleteInodeFileMapCommand) IsSingleShot ¶
func (c DeleteInodeFileMapCommand) IsSingleShot() bool
func (DeleteInodeFileMapCommand) NeedTwoPhaseCommit ¶
func (c DeleteInodeFileMapCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type DeleteMetaCommand ¶
type DeleteMetaCommand struct {
// contains filtered or unexported fields
}
func NewDeleteMetaCommand ¶
func NewDeleteMetaCommand(txId TxId, parentWorking *WorkingMeta, key string) DeleteMetaCommand
func (DeleteMetaCommand) Commit ¶
func (c DeleteMetaCommand) Commit(n *NodeServer)
func (DeleteMetaCommand) GetExtCmdId ¶
func (c DeleteMetaCommand) GetExtCmdId() uint16
func (DeleteMetaCommand) GetTxId ¶
func (c DeleteMetaCommand) GetTxId() TxId
func (DeleteMetaCommand) IsSingleShot ¶
func (c DeleteMetaCommand) IsSingleShot() bool
func (DeleteMetaCommand) NeedTwoPhaseCommit ¶
func (c DeleteMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type DeleteMetaOp ¶
type DeleteMetaOp struct {
// contains filtered or unexported fields
}
func NewDeleteMetaOp ¶
func NewDeleteMetaOp(txId TxId, inodeKey InodeKeyType, removedKey string) DeleteMetaOp
func (DeleteMetaOp) GetCaller ¶
func (o DeleteMetaOp) GetCaller(n *NodeServer) RpcCaller
func (DeleteMetaOp) GetLeader ¶
func (o DeleteMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (DeleteMetaOp) GetTxId ¶
func (o DeleteMetaOp) GetTxId() TxId
func (DeleteMetaOp) RetToMsg ¶
func (o DeleteMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type DeletePersistCoordinatorCommand ¶
type DeletePersistCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewDeletePersistCoordinatorCommand ¶
func NewDeletePersistCoordinatorCommand(key string) DeletePersistCoordinatorCommand
func (DeletePersistCoordinatorCommand) Commit ¶
func (c DeletePersistCoordinatorCommand) Commit(n *NodeServer)
func (DeletePersistCoordinatorCommand) GetExtCmdId ¶
func (c DeletePersistCoordinatorCommand) GetExtCmdId() uint16
func (DeletePersistCoordinatorCommand) GetTxId ¶
func (c DeletePersistCoordinatorCommand) GetTxId() TxId
func (DeletePersistCoordinatorCommand) IsSingleShot ¶
func (c DeletePersistCoordinatorCommand) IsSingleShot() bool
func (DeletePersistCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c DeletePersistCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
func (DeletePersistCoordinatorCommand) RemoteCommit ¶
func (c DeletePersistCoordinatorCommand) RemoteCommit(*RaftGroupMgr) []ParticipantOp
type DeletedFileInfo ¶
type DeletedFileInfo struct {
// contains filtered or unexported fields
}
func NewDeleteFileInfoFromMeta ¶
func NewDeleteFileInfoFromMeta(meta *WorkingMeta) DeletedFileInfo
func NewDeleteFileInfoFromMsg ¶
func NewDeleteFileInfoFromMsg(msg *common.DeletedFileInfoMsg) DeletedFileInfo
type DirtyChunkInfo ¶
type DirtyChunkInfo struct { OffsetVersions map[int64]uint32 // contains filtered or unexported fields }
func NewDirtyChunkInfoFromMsg ¶
func NewDirtyChunkInfoFromMsg(msg *common.DirtyChunkInfoMsg) DirtyChunkInfo
type DirtyMetaInfo ¶
type DirtyMetaInfo struct {
// contains filtered or unexported fields
}
func NewDirtyMetaInfoFromMeta ¶
func NewDirtyMetaInfoFromMeta(meta *WorkingMeta) DirtyMetaInfo
func NewDirtyMetaInfoFromMsg ¶
func NewDirtyMetaInfoFromMsg(msg *common.DirtyMetaInfoMsg) DirtyMetaInfo
type DirtyMgr ¶
type DirtyMgr struct {
// contains filtered or unexported fields
}
func NewDirtyMgr ¶
func NewDirtyMgr() *DirtyMgr
func NewDirtyMgrFromMsg ¶
func NewDirtyMgrFromMsg(msg *common.DirtyMgrSnapshotMsg) *DirtyMgr
func (*DirtyMgr) AddChildMetaNoLock ¶
func (d *DirtyMgr) AddChildMetaNoLock(meta *WorkingMeta, name string)
func (*DirtyMgr) AddChunkNoLock ¶
func (*DirtyMgr) AddDeleteKeyNoLock ¶
func (d *DirtyMgr) AddDeleteKeyNoLock(key string, meta *WorkingMeta)
func (*DirtyMgr) AddMetaNoLock ¶
func (d *DirtyMgr) AddMetaNoLock(meta *WorkingMeta)
func (*DirtyMgr) AddMigratedAddChunk ¶
func (d *DirtyMgr) AddMigratedAddChunk(migrationId MigrationId, chunk *common.AppendCommitUpdateChunksMsg)
func (*DirtyMgr) AddMigratedAddMetas ¶
func (*DirtyMgr) AddMigratedRemoveChunk ¶
func (d *DirtyMgr) AddMigratedRemoveChunk(migrationId MigrationId, chunks []*common.ChunkRemoveDirtyMsg)
func (*DirtyMgr) AddMigratedRemoveMetas ¶
func (d *DirtyMgr) AddMigratedRemoveMetas(migrationId MigrationId, inodeKeys []uint64, dirKeys []uint64)
func (*DirtyMgr) AppendForgetAllDirtyLog ¶
func (d *DirtyMgr) AppendForgetAllDirtyLog(raft *RaftInstance) int32
func (*DirtyMgr) AppendRemoveNonDirtyChunksLog ¶
func (d *DirtyMgr) AppendRemoveNonDirtyChunksLog(raft *RaftInstance, fps []uint64) int32
func (*DirtyMgr) ApplyAsRemoveNonDirtyChunks ¶
func (*DirtyMgr) CheckReset ¶
func (*DirtyMgr) CommitMigratedDataLocal ¶
func (d *DirtyMgr) CommitMigratedDataLocal(inodeMgr *InodeMgr, migrationId MigrationId)
func (*DirtyMgr) CopyAllExpiredPrimaryDeletedDirtyMeta ¶
func (d *DirtyMgr) CopyAllExpiredPrimaryDeletedDirtyMeta() map[string]InodeKeyType
func (*DirtyMgr) CopyAllExpiredPrimaryDirtyMeta ¶
func (d *DirtyMgr) CopyAllExpiredPrimaryDirtyMeta() []InodeKeyType
func (*DirtyMgr) CopyAllPrimaryDeletedKeys ¶
func (d *DirtyMgr) CopyAllPrimaryDeletedKeys() map[string]InodeKeyType
func (*DirtyMgr) CopyAllPrimaryDirtyMeta ¶
func (d *DirtyMgr) CopyAllPrimaryDirtyMeta() []InodeKeyType
func (*DirtyMgr) DropMigratingData ¶
func (d *DirtyMgr) DropMigratingData(migrationId MigrationId)
func (*DirtyMgr) ForgetAllDirty ¶
func (d *DirtyMgr) ForgetAllDirty()
func (*DirtyMgr) GetAllDirtyMeta ¶
func (d *DirtyMgr) GetAllDirtyMeta() []*common.DirtyMetaInfoMsg
func (*DirtyMgr) GetDeleteKey ¶
func (d *DirtyMgr) GetDeleteKey(key string) (inodeKey InodeKeyType, ok bool)
func (*DirtyMgr) GetDirInodesForNodeJoin ¶
func (d *DirtyMgr) GetDirInodesForNodeJoin(dirInodes []*common.InodeTreeMsg, migrationId MigrationId, nodeList *RaftNodeList, newRing *hashring.HashRing, selfGroup string, joinGroup string) []*common.InodeTreeMsg
func (*DirtyMgr) GetDirMetaForNodeLeave ¶
func (d *DirtyMgr) GetDirMetaForNodeLeave(keys []*common.InodeTreeMsg, nodeList *RaftNodeList) map[string][]*common.InodeTreeMsg
func (*DirtyMgr) GetDirtyChunkAll ¶
func (d *DirtyMgr) GetDirtyChunkAll() map[InodeKeyType]DirtyChunkInfo
func (*DirtyMgr) GetDirtyChunkForNodeJoin ¶
func (d *DirtyMgr) GetDirtyChunkForNodeJoin(migrationId MigrationId, nodeList *RaftNodeList, newRing *hashring.HashRing, selfGroupId string, joinGroupId string) map[InodeKeyType]DirtyChunkInfo
func (*DirtyMgr) GetDirtyMetaForNodeLeave ¶
func (d *DirtyMgr) GetDirtyMetaForNodeLeave(nodeList *RaftNodeList) (map[InodeKeyType]bool, map[string]map[InodeKeyType]bool)
GetDirtyMetaForNodeLeave returns a blank string if the number of participant Node is < nrReplicas
func (*DirtyMgr) GetDirtyMetasForNodeJoin ¶
func (d *DirtyMgr) GetDirtyMetasForNodeJoin(migrationId MigrationId, nodeList *RaftNodeList, newRing *hashring.HashRing, selfGroup string, joinGroup string) map[InodeKeyType]bool
func (*DirtyMgr) GetLikelyDirtyChunkInodeIds ¶
func (d *DirtyMgr) GetLikelyDirtyChunkInodeIds() []InodeKeyType
func (*DirtyMgr) IsDirtyChunk ¶
func (*DirtyMgr) IsDirtyMeta ¶
func (d *DirtyMgr) IsDirtyMeta(inodeKey InodeKeyType) (ok bool)
func (*DirtyMgr) RemoveChildMetaNoLock ¶
func (d *DirtyMgr) RemoveChildMetaNoLock(meta *WorkingMeta, name string)
func (*DirtyMgr) RemoveChunkNoLock ¶
func (d *DirtyMgr) RemoveChunkNoLock(inodeKey InodeKeyType, offset int64, chunkVer uint32)
func (*DirtyMgr) RemoveChunkNoLockAllOffsets ¶
func (d *DirtyMgr) RemoveChunkNoLockAllOffsets(inodeId InodeKeyType)
func (*DirtyMgr) RemoveDeleteKeyNoLock ¶
func (d *DirtyMgr) RemoveDeleteKeyNoLock(key string) (InodeKeyType, bool)
func (*DirtyMgr) RemoveMetaNoLock ¶
func (d *DirtyMgr) RemoveMetaNoLock(inodeId InodeKeyType)
func (*DirtyMgr) RemoveMetaNoLockIfLatest ¶
func (d *DirtyMgr) RemoveMetaNoLockIfLatest(inodeId InodeKeyType, version uint32) bool
func (*DirtyMgr) RemoveNonDirtyChunks ¶
type DiskWriteVector ¶
type DiskWriteVector struct {
// contains filtered or unexported fields
}
type DropLRUChunksCommand ¶
type DropLRUChunksCommand struct {
// contains filtered or unexported fields
}
func NewDropLRUChunksCommand ¶
func NewDropLRUChunksCommand(inodeKeys []uint64, offsets []int64) DropLRUChunksCommand
func (DropLRUChunksCommand) Commit ¶
func (c DropLRUChunksCommand) Commit(n *NodeServer)
func (DropLRUChunksCommand) GetExtCmdId ¶
func (c DropLRUChunksCommand) GetExtCmdId() uint16
func (DropLRUChunksCommand) GetTxId ¶
func (c DropLRUChunksCommand) GetTxId() TxId
func (DropLRUChunksCommand) IsSingleShot ¶
func (c DropLRUChunksCommand) IsSingleShot() bool
func (DropLRUChunksCommand) NeedTwoPhaseCommit ¶
func (c DropLRUChunksCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type EpollHandler ¶
type EpollHandler struct {
// contains filtered or unexported fields
}
func NewEpollHandler ¶
func NewEpollHandler() (*EpollHandler, error)
func (*EpollHandler) Close ¶
func (r *EpollHandler) Close() (err error)
func (*EpollHandler) RemoveFd ¶
func (r *EpollHandler) RemoveFd(fd int) (err error)
type EpollReader ¶
type EpollReader struct {
// contains filtered or unexported fields
}
func NewEpollReader ¶
func NewEpollReader() (*EpollReader, error)
func (*EpollReader) AddFd ¶
func (r *EpollReader) AddFd(fd int, sa common.NodeAddrInet4) (err error)
func (*EpollReader) CheckReset ¶
func (r *EpollReader) CheckReset() (ok bool)
func (*EpollReader) Close ¶
func (r *EpollReader) Close() error
func (*EpollReader) RaftRpcThread ¶
func (r *EpollReader) RaftRpcThread(maxEvents int, n *NodeServer, pipeFds [2]int, raft *RaftInstance)
func (*EpollReader) RemoveFd ¶
func (r *EpollReader) RemoveFd(fd int) (err error)
type ExpireDeleteInfo ¶
type ExpireDeleteInfo struct {
// contains filtered or unexported fields
}
func NewExpireDeleteInfoFromMeta ¶
func NewExpireDeleteInfoFromMeta(key string, meta *WorkingMeta, timestamp int64) ExpireDeleteInfo
func NewExpireDeleteInfoFromMsg ¶
func NewExpireDeleteInfoFromMsg(msg *common.DeletedFileInfoMsg) ExpireDeleteInfo
type ExpireInfo ¶
type ExpireInfo struct {
// contains filtered or unexported fields
}
func NewExpireInfoFromMeta ¶
func NewExpireInfoFromMeta(meta *WorkingMeta, timestamp int64) ExpireInfo
func NewExpireInfoFromMsg ¶
func NewExpireInfoFromMsg(msg *common.DirtyMetaInfoMsg) ExpireInfo
type ExtLogCommand ¶
type ExtLogCommand struct {
// contains filtered or unexported fields
}
func NewExtLogCommand ¶
func NewExtLogCommandFromExtBuf ¶
func NewExtLogCommandFromExtBuf(extCmdId uint16, logId LogIdType, logOffset int64, extBuf []byte) ExtLogCommand
func (ExtLogCommand) Apply ¶
func (c ExtLogCommand) Apply(n *NodeServer, extLog ExtLogCommandImpl)
func (ExtLogCommand) GetCmdId ¶
func (c ExtLogCommand) GetCmdId() uint16
func (ExtLogCommand) GetExtPayloadSize ¶
func (c ExtLogCommand) GetExtPayloadSize() uint8
func (ExtLogCommand) SetExtPayload ¶
func (c ExtLogCommand) SetExtPayload(extPayload []byte)
type ExtLogCommandImpl ¶
type ExtLogCommandImpl interface { GetExtCmdId() uint16 GetTxId() TxId IsSingleShot() bool NeedTwoPhaseCommit(*RaftGroupMgr) bool Commit(*NodeServer) // contains filtered or unexported methods }
func LoadExtBuf ¶
func LoadExtBuf(extLogger *OnDiskLogger, l *AppendEntryCommand) (extCmd ExtLogCommandImpl, err error)
func NewAbortTxCommandFromExtbuf ¶
func NewAbortTxCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewAddInodeFileMapCommandFromExtbuf ¶
func NewAddInodeFileMapCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewBeginPersistCommandFromExtBuf ¶
func NewBeginPersistCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewCommitChunkCommandFromExtbuf ¶
func NewCommitChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewCompactLogCoordinatorCommandFromExtBuf ¶
func NewCompactLogCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewCreateChunkCommandFromExtbuf ¶
func NewCreateChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewCreateCoordinatorCommandFromExtBuf ¶
func NewCreateCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewCreateMetaCommandFromExtbuf ¶
func NewCreateMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewDeleteCoordinatorCommandFromExtBuf ¶
func NewDeleteCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewDeleteInodeFileMapCommandFromExtbuf ¶
func NewDeleteInodeFileMapCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewDeleteMetaCommandFromExtbuf ¶
func NewDeleteMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewDeletePersistCoordinatorCommandFromExtBuf ¶
func NewDeletePersistCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewDropLRUChunksCommandFromExtbuf ¶
func NewDropLRUChunksCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewFlushCoordinatorCommandFromExtBuf ¶
func NewFlushCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewForgetAllDirtyLogCommandFromExtbuf ¶
func NewForgetAllDirtyLogCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewHardLinkCoordinatorCommandFromExtBuf ¶
func NewHardLinkCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewInitNodeListCommandFromExtBuf ¶
func NewInitNodeListCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewPersistChunkCommandFromExtbuf ¶
func NewPersistChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewPersistCoordinatorCommandFromExtBuf ¶
func NewPersistCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewRecordMigratedAddChunkCommandFromExtbuf ¶
func NewRecordMigratedAddChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewRecordMigratedAddMetaCommandFromExtbuf ¶
func NewRecordMigratedAddMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewRecordMigratedRemoveChunkCommandFromExtbuf ¶
func NewRecordMigratedRemoveChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewRecordMigratedRemoveMetaCommandFromExtbuf ¶
func NewRecordMigratedRemoveMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewRemoveNonDirtyChunksCommandFromExtbuf ¶
func NewRemoveNonDirtyChunksCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewRenameCoordinatorCommandFromExtBuf ¶
func NewRenameCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewTruncateCoordinatorCommandFromExtBuf ¶
func NewTruncateCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewUpdateChunkCommandFromExtbuf ¶
func NewUpdateChunkCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewUpdateMetaAttrCommandFromExtbuf ¶
func NewUpdateMetaAttrCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewUpdateMetaCommandFromExtbuf ¶
func NewUpdateMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewUpdateMetaKeyCommandFromExtbuf ¶
func NewUpdateMetaKeyCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewUpdateNodeListCommandFromExtbuf ¶
func NewUpdateNodeListCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewUpdateNodeListCoordinatorCommandFromExtBuf ¶
func NewUpdateNodeListCoordinatorCommandFromExtBuf(extBuf []byte) (ExtLogCommandImpl, error)
func NewUpdateParentMetaCommandFromExtbuf ¶
func NewUpdateParentMetaCommandFromExtbuf(extBuf []byte) (ExtLogCommandImpl, error)
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
func NewFileHandle ¶
func NewFileHandle(h MetaRWHandler, isReadOnly bool, disableLocalWriteBackCaching bool) *FileHandle
func (*FileHandle) Flush ¶
func (i *FileHandle) Flush(n *NodeServer) (meta *WorkingMeta, errno error)
func (*FileHandle) GetLength ¶
func (i *FileHandle) GetLength() int64
func (*FileHandle) Read ¶
func (i *FileHandle) Read(offset int64, size int64, n *NodeServer, op interface{}) (data [][]byte, count int, errno error)
func (*FileHandle) ReadNoCache ¶
func (i *FileHandle) ReadNoCache(offset int64, size int64, n *NodeServer, op interface{}) (data [][]byte, count int, errno error)
func (*FileHandle) ReleaseFlyingBuffer ¶
func (i *FileHandle) ReleaseFlyingBuffer(op interface{})
func (*FileHandle) SetMeta ¶
func (i *FileHandle) SetMeta(meta *WorkingMeta)
func (*FileHandle) SetModeMTime ¶
func (i *FileHandle) SetModeMTime(mode *os.FileMode, mTime *time.Time)
func (*FileHandle) Write ¶
func (i *FileHandle) Write(offset int64, data []byte, n *NodeServer) (meta *WorkingMeta, errno error)
type FillNodeListOp ¶
type FillNodeListOp struct {
// contains filtered or unexported fields
}
func NewFillNodeListOp ¶
func NewFillNodeListOp(txId TxId, nodeList *RaftNodeList, target RaftNode, migrationId MigrationId) FillNodeListOp
func (FillNodeListOp) GetCaller ¶
func (o FillNodeListOp) GetCaller(n *NodeServer) RpcCaller
func (FillNodeListOp) GetLeader ¶
func (o FillNodeListOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (FillNodeListOp) GetTxId ¶
func (o FillNodeListOp) GetTxId() TxId
func (FillNodeListOp) RetToMsg ¶
func (o FillNodeListOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type FillingInfo ¶
type FillingInfo struct {
// contains filtered or unexported fields
}
type FillingKey ¶
type FillingKey struct {
// contains filtered or unexported fields
}
type FillingKey2 ¶
type FillingKey2 struct {
// contains filtered or unexported fields
}
type FlushCoordinatorCommand ¶
type FlushCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewFlushCoordinatorCommand ¶
func NewFlushCoordinatorCommand(txId TxId, chunks []*common.UpdateChunkRecordMsg, metaTx TxRet, commitTxId TxId) FlushCoordinatorCommand
func (FlushCoordinatorCommand) Commit ¶
func (c FlushCoordinatorCommand) Commit(n *NodeServer)
func (FlushCoordinatorCommand) GetExtCmdId ¶
func (c FlushCoordinatorCommand) GetExtCmdId() uint16
func (FlushCoordinatorCommand) GetTxId ¶
func (c FlushCoordinatorCommand) GetTxId() TxId
func (FlushCoordinatorCommand) IsSingleShot ¶
func (c FlushCoordinatorCommand) IsSingleShot() bool
func (FlushCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c FlushCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
func (FlushCoordinatorCommand) RemoteCommit ¶
func (c FlushCoordinatorCommand) RemoteCommit(raftGroup *RaftGroupMgr) []ParticipantOp
type ForgetAllDirtyLogCommand ¶
type ForgetAllDirtyLogCommand struct { }
func NewForgetAllDirtyLogCommand ¶
func NewForgetAllDirtyLogCommand() ForgetAllDirtyLogCommand
func (ForgetAllDirtyLogCommand) Commit ¶
func (c ForgetAllDirtyLogCommand) Commit(n *NodeServer)
func (ForgetAllDirtyLogCommand) GetExtCmdId ¶
func (c ForgetAllDirtyLogCommand) GetExtCmdId() uint16
func (ForgetAllDirtyLogCommand) GetTxId ¶
func (c ForgetAllDirtyLogCommand) GetTxId() TxId
func (ForgetAllDirtyLogCommand) IsSingleShot ¶
func (c ForgetAllDirtyLogCommand) IsSingleShot() bool
func (ForgetAllDirtyLogCommand) NeedTwoPhaseCommit ¶
func (c ForgetAllDirtyLogCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type GCS3 ¶
type GCS3 struct {
*S3Backend
}
GCS variant of S3
func (*GCS3) DeleteBlobs ¶
func (s *GCS3) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*GCS3) MultipartBlobAdd ¶
func (s *GCS3) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*GCS3) MultipartBlobBegin ¶
func (s *GCS3) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (*GCS3) MultipartBlobCommit ¶
func (s *GCS3) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
type GCSMultipartBlobCommitInput ¶
type GCSMultipartBlobCommitInput struct { Size uint64 ETag *string Prev *MultipartBlobAddInput }
type GetApiIpAndPortOp ¶
type GetApiIpAndPortOp struct {
// contains filtered or unexported fields
}
func NewGetApiIpAndPortOp ¶
func NewGetApiIpAndPortOp(leader RaftNode) GetApiIpAndPortOp
func (GetApiIpAndPortOp) GetCaller ¶
func (o GetApiIpAndPortOp) GetCaller(*NodeServer) RpcCaller
func (GetApiIpAndPortOp) GetLeader ¶
func (o GetApiIpAndPortOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (GetApiIpAndPortOp) RetToMsg ¶
func (o GetApiIpAndPortOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type GetBlobInput ¶
type GetBlobOutput ¶
type GetBlobOutput struct { HeadBlobOutput Body io.ReadCloser RequestId string }
type GetMetaOp ¶
type GetMetaOp struct {
// contains filtered or unexported fields
}
func NewGetMetaOp ¶
func NewGetMetaOp(inodeKey InodeKeyType, key string, chunkSize int64, expireMs int32, parent InodeKeyType) GetMetaOp
func (GetMetaOp) GetCaller ¶
func (o GetMetaOp) GetCaller(*NodeServer) RpcCaller
func (GetMetaOp) GetLeader ¶
func (o GetMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (GetMetaOp) RetToMsg ¶
func (o GetMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type GetWorkingMetaRet ¶
type GetWorkingMetaRet struct {
// contains filtered or unexported fields
}
func NewGetWrokingMetaRetFromMsg ¶
func NewGetWrokingMetaRetFromMsg(msg *common.GetWorkingMetaRetMsg) *GetWorkingMetaRet
func (*GetWorkingMetaRet) GetChildrenMsg ¶
func (u *GetWorkingMetaRet) GetChildrenMsg() []*common.CopiedMetaChildMsg
type HardLinkCoordinatorCommand ¶
type HardLinkCoordinatorCommand struct {
// contains filtered or unexported fields
}
func (HardLinkCoordinatorCommand) Commit ¶
func (c HardLinkCoordinatorCommand) Commit(n *NodeServer)
func (HardLinkCoordinatorCommand) GetExtCmdId ¶
func (c HardLinkCoordinatorCommand) GetExtCmdId() uint16
func (HardLinkCoordinatorCommand) GetTxId ¶
func (c HardLinkCoordinatorCommand) GetTxId() TxId
func (HardLinkCoordinatorCommand) IsSingleShot ¶
func (c HardLinkCoordinatorCommand) IsSingleShot() bool
func (HardLinkCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c HardLinkCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
func (HardLinkCoordinatorCommand) RemoteCommit ¶
func (c HardLinkCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
type HeadBlobInput ¶
type HeadBlobInput struct {
Key string
}
type HeadBlobOutput ¶
type InitNodeListCommand ¶
type InitNodeListCommand struct {
// contains filtered or unexported fields
}
func NewInitNodeListCommand ¶
func NewInitNodeListCommand(node RaftNode) InitNodeListCommand
func (InitNodeListCommand) Commit ¶
func (c InitNodeListCommand) Commit(n *NodeServer)
func (InitNodeListCommand) GetExtCmdId ¶
func (c InitNodeListCommand) GetExtCmdId() uint16
func (InitNodeListCommand) GetTxId ¶
func (c InitNodeListCommand) GetTxId() TxId
func (InitNodeListCommand) IsSingleShot ¶
func (c InitNodeListCommand) IsSingleShot() bool
func (InitNodeListCommand) NeedTwoPhaseCommit ¶
func (c InitNodeListCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type Inode ¶
type Inode struct {
// contains filtered or unexported fields
}
func (*Inode) CopyChildren ¶
func (i *Inode) CopyChildren() map[string]InodeKeyType
func (*Inode) CopyMeta ¶
func (i *Inode) CopyMeta() *WorkingMeta
func (*Inode) UpdateMeta ¶
func (i *Inode) UpdateMeta(meta *WorkingMeta, children map[string]InodeKeyType)
type InodeKeyType ¶
type InodeKeyType uint64
type InodeMgr ¶
type InodeMgr struct {
// contains filtered or unexported fields
}
func NewInodeMgr ¶
func NewInodeMgr(back *ObjCacheBackend, raft *RaftInstance, flags *common.ObjcacheConfig) *InodeMgr
func (*InodeMgr) AppendStagingChunkBuffer ¶
func (*InodeMgr) AppendStagingChunkLog ¶
func (*InodeMgr) CheckReset ¶
func (*InodeMgr) CommitCreateChunk ¶
func (*InodeMgr) CommitCreateMeta ¶
func (n *InodeMgr) CommitCreateMeta(working *WorkingMeta, parent InodeKeyType, newKey string, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitDeleteChunk ¶
func (n *InodeMgr) CommitDeleteChunk(inodeKey InodeKeyType, offset int64, chunkSize int64, chunkVer uint32, stags []*common.StagingChunkAddMsg, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitDeleteInodeMap ¶
func (*InodeMgr) CommitDeletePersistMeta ¶
func (*InodeMgr) CommitPersistChunk ¶
func (n *InodeMgr) CommitPersistChunk(inodeKey InodeKeyType, offsets []int64, cVers []uint32, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitPersistMeta ¶
func (*InodeMgr) CommitSetMetaAndInodeFile ¶
func (n *InodeMgr) CommitSetMetaAndInodeFile(working *WorkingMeta, children map[string]InodeKeyType, key string)
func (*InodeMgr) CommitUpdateChunk ¶
func (n *InodeMgr) CommitUpdateChunk(inodeKey InodeKeyType, offset int64, chunkSize int64, chunkVer uint32, stags []*common.StagingChunkAddMsg, objectSize int64, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitUpdateInodeToFile ¶
func (n *InodeMgr) CommitUpdateInodeToFile(working *WorkingMeta, children map[string]InodeKeyType, removedKey string, newKey string, dirtyMgr *DirtyMgr) *WorkingMeta
func (*InodeMgr) CommitUpdateMeta ¶
func (n *InodeMgr) CommitUpdateMeta(working *WorkingMeta, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitUpdateMetaAttr ¶
func (n *InodeMgr) CommitUpdateMetaAttr(inodeKey InodeKeyType, mode uint32, ts int64)
func (*InodeMgr) CommitUpdateParentMeta ¶
func (n *InodeMgr) CommitUpdateParentMeta(info *UpdateParentInfo, dirtyMgr *DirtyMgr)
func (*InodeMgr) CreateInodeId ¶
func (n *InodeMgr) CreateInodeId() (InodeKeyType, error)
func (*InodeMgr) DeleteInode ¶
func (*InodeMgr) DropLRUChunk ¶
func (*InodeMgr) GetAllChunks ¶
func (n *InodeMgr) GetAllChunks(chunks map[InodeKeyType]DirtyChunkInfo) ([]*common.AppendCommitUpdateChunksMsg, error)
func (*InodeMgr) GetAllDirInodes ¶
func (n *InodeMgr) GetAllDirInodes() []*common.InodeTreeMsg
func (*InodeMgr) GetAllDirectoryMetaAsUint64 ¶
func (*InodeMgr) GetAllMeta ¶
func (n *InodeMgr) GetAllMeta() ([]*common.CopiedMetaMsg, []*common.InodeToFileMsg)
func (*InodeMgr) GetAllMetaIn ¶
func (n *InodeMgr) GetAllMetaIn(inodeKeys []uint64) ([]*common.CopiedMetaMsg, []*common.InodeToFileMsg)
func (*InodeMgr) GetChunk ¶
func (n *InodeMgr) GetChunk(inodeKey InodeKeyType, offset int64, chunkSize int64) *Chunk
func (*InodeMgr) GetInode ¶
func (n *InodeMgr) GetInode(inodeKey InodeKeyType) *Inode
func (*InodeMgr) GetMetaForNodeJoin ¶
func (n *InodeMgr) GetMetaForNodeJoin(migrationId MigrationId, selfGroup string, joinGroup string, nodeList *RaftNodeList, newRing *hashring.HashRing, dirtyMetas map[InodeKeyType]bool) *Snapshot
func (*InodeMgr) GetMetaForNodeLeave ¶
func (n *InodeMgr) GetMetaForNodeLeave(migrationId MigrationId, nodeList *RaftNodeList, dirtyMetas map[string]map[InodeKeyType]bool) map[string]*Snapshot
func (*InodeMgr) GetOrFetchWorkingMeta ¶
func (n *InodeMgr) GetOrFetchWorkingMeta(inodeKey InodeKeyType, key string, chunkSize int64, expireMs int32, parent InodeKeyType) (*WorkingMeta, map[string]InodeKeyType, int32)
func (*InodeMgr) NewWorkingMetaForRoot ¶
func (n *InodeMgr) NewWorkingMetaForRoot() (*WorkingMeta, map[string]InodeKeyType)
func (*InodeMgr) PersistDeleteObject ¶
func (*InodeMgr) PrefetchChunkThread ¶
func (n *InodeMgr) PrefetchChunkThread(h MetaRWHandler, offset int64)
func (*InodeMgr) PrepareCreateMeta ¶
func (n *InodeMgr) PrepareCreateMeta(inodeKey InodeKeyType, chunkSize int64, expireMs int32, mode uint32) (*WorkingMeta, func(*NodeServer), int32)
func (*InodeMgr) PreparePersistChunk ¶
func (n *InodeMgr) PreparePersistChunk(meta *WorkingMeta, offset int64) (chunk *Chunk, working *WorkingChunk, reply int32)
func (*InodeMgr) PreparePersistDeleteMeta ¶
func (*InodeMgr) PreparePersistMeta ¶
func (n *InodeMgr) PreparePersistMeta(inodeKey InodeKeyType, dirtyMgr *DirtyMgr) (*Inode, []string, *WorkingMeta, int32)
func (*InodeMgr) PrepareUpdateChunk ¶
func (n *InodeMgr) PrepareUpdateChunk(newMeta *WorkingMeta, alignedOffset int64) (chunk *Chunk, working *WorkingChunk)
func (*InodeMgr) PrepareUpdateMeta ¶
func (n *InodeMgr) PrepareUpdateMeta(inodeKey InodeKeyType, delete bool) (*WorkingMeta, func(*NodeServer), int32)
func (*InodeMgr) PrepareUpdateMetaKey ¶
func (n *InodeMgr) PrepareUpdateMetaKey(inodeKey InodeKeyType, oldKey string, parent InodeKeyType, chunkSize int64, expireMs int32) (*WorkingMeta, map[string]InodeKeyType, func(*NodeServer), int32)
func (*InodeMgr) PrepareUpdateParent ¶
func (n *InodeMgr) PrepareUpdateParent(inodeKey InodeKeyType, delete bool) (*WorkingMeta, map[string]InodeKeyType, func(*NodeServer), int32)
func (*InodeMgr) PutDirObject ¶
func (*InodeMgr) PutEmptyObject ¶
func (*InodeMgr) QuickCommitDeleteChunk ¶
func (n *InodeMgr) QuickCommitDeleteChunk(localOffsets map[int64]int64, meta *WorkingMeta, dirtyMgr *DirtyMgr)
func (*InodeMgr) QuickCommitExpandChunk ¶
func (n *InodeMgr) QuickCommitExpandChunk(localOffsets map[int64]int64, meta *WorkingMeta, dirtyMgr *DirtyMgr)
func (*InodeMgr) QuickCommitUpdateChunk ¶
func (n *InodeMgr) QuickCommitUpdateChunk(meta *WorkingMeta, selfGroup string, ucs []*common.UpdateChunkRecordMsg, dirtyMgr *DirtyMgr)
func (*InodeMgr) QuickPrepareChunk ¶
func (n *InodeMgr) QuickPrepareChunk(newMeta *WorkingMeta, alignedOffset int64) (chunk *Chunk, working *WorkingChunk)
func (*InodeMgr) RestoreInodeTree ¶
func (n *InodeMgr) RestoreInodeTree(inodes []*common.InodeTreeMsg)
func (*InodeMgr) RestoreMetas ¶
func (n *InodeMgr) RestoreMetas(metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg)
func (*InodeMgr) SetChunkNoLock ¶
func (n *InodeMgr) SetChunkNoLock(chunk *Chunk, h MetaRWHandler) (*WorkingChunk, int32)
SetChunkNoLock: caller must hold chunk.lock.Lock()
func (*InodeMgr) UnlockPersistInode ¶
func (n *InodeMgr) UnlockPersistInode(inode *Inode, inodeKey InodeKeyType)
func (*InodeMgr) UpdateMetaAttr ¶
func (n *InodeMgr) UpdateMetaAttr(inodeKey InodeKeyType, mode uint32, ts int64) (*WorkingMeta, int32)
func (*InodeMgr) UpdateMetaXattr ¶
func (n *InodeMgr) UpdateMetaXattr(inodeKey InodeKeyType, expireMs int32, dirtyMgr *DirtyMgr) int32
func (*InodeMgr) VectorReadChunk ¶
func (n *InodeMgr) VectorReadChunk(h MetaRWHandler, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, reply int32)
type JoinMigrationOp ¶
type JoinMigrationOp struct {
// contains filtered or unexported fields
}
func NewJoinMigrationOp ¶
func NewJoinMigrationOp(txId TxId, target RaftNode, leaderGroupId string, migrationId MigrationId) JoinMigrationOp
func (JoinMigrationOp) GetCaller ¶
func (o JoinMigrationOp) GetCaller(n *NodeServer) RpcCaller
func (JoinMigrationOp) GetLeader ¶
func (o JoinMigrationOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (JoinMigrationOp) GetTxId ¶
func (o JoinMigrationOp) GetTxId() TxId
func (JoinMigrationOp) RetToMsg ¶
func (o JoinMigrationOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type LeaveMigrationOp ¶
type LeaveMigrationOp struct {
// contains filtered or unexported fields
}
func NewLeaveMigrationOp ¶
func NewLeaveMigrationOp(txId TxId, target RaftNode, leaderGroupId string, migrationId MigrationId) LeaveMigrationOp
func (LeaveMigrationOp) GetCaller ¶
func (o LeaveMigrationOp) GetCaller(n *NodeServer) RpcCaller
func (LeaveMigrationOp) GetLeader ¶
func (o LeaveMigrationOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (LeaveMigrationOp) GetTxId ¶
func (o LeaveMigrationOp) GetTxId() TxId
func (LeaveMigrationOp) RetToMsg ¶
func (o LeaveMigrationOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type ListBlobsInput ¶
type ListBlobsOutput ¶
type ListBlobsOutput struct { Prefixes []BlobPrefixOutput Items []BlobItemOutput NextContinuationToken *string IsTruncated bool RequestId string }
type LocalInode ¶
type LocalInode struct {
// contains filtered or unexported fields
}
type LocalReadHistory ¶
type LocalReadHistory struct {
// contains filtered or unexported fields
}
func NewLocalBufferCacheHistory ¶
func NewLocalBufferCacheHistory() *LocalReadHistory
func (*LocalReadHistory) Add ¶
func (c *LocalReadHistory) Add(inodeKey InodeKeyType, offset int64, length int)
func (*LocalReadHistory) CheckReset ¶
func (c *LocalReadHistory) CheckReset() (ok bool)
func (*LocalReadHistory) Delete ¶
func (c *LocalReadHistory) Delete(inodeKey InodeKeyType)
func (*LocalReadHistory) DropAll ¶
func (c *LocalReadHistory) DropAll()
func (*LocalReadHistory) Has ¶
func (c *LocalReadHistory) Has(inodeKey InodeKeyType, offset int64) (int, bool)
type LogIdType ¶
type LogIdType struct {
// contains filtered or unexported fields
}
func NewLogIdTypeFromBuf ¶
func NewLogIdTypeFromInodeKey ¶
func NewLogIdTypeFromInodeKey(inodeKey InodeKeyType, offset int64, chunkSize int64) LogIdType
type LogOffsetPair ¶
type LogOffsetPair struct {
// contains filtered or unexported fields
}
type MakeBucketInput ¶
type MakeBucketInput struct { }
type MakeBucketOutput ¶
type MakeBucketOutput struct {
RequestId string
}
type MemoryPool ¶
type MemoryPool struct {
// contains filtered or unexported fields
}
var MemPool *MemoryPool
func (*MemoryPool) CheckReset ¶
func (m *MemoryPool) CheckReset() (ok bool)
func (*MemoryPool) GetPages ¶
func (m *MemoryPool) GetPages(nrPages int64) (buf *PageBuffer, err error)
func (*MemoryPool) PutPages ¶
func (m *MemoryPool) PutPages(buf *PageBuffer)
func (*MemoryPool) Reset ¶
func (m *MemoryPool) Reset()
type MetaRWHandler ¶
type MetaRWHandler struct {
// contains filtered or unexported fields
}
func NewMetaRWHandlerFromMeta ¶
func NewMetaRWHandlerFromMeta(meta *WorkingMeta) MetaRWHandler
func NewMetaRWHandlerFromMsg ¶
func NewMetaRWHandlerFromMsg(msg *common.MetaRWHandlerMsg) MetaRWHandler
type MigrationId ¶
func NewMigrationIdFromMsg ¶
func NewMigrationIdFromMsg(migrationId *common.MigrationIdMsg) MigrationId
type MpuAbortOp ¶
type MpuAbortOp struct {
// contains filtered or unexported fields
}
func NewMpuAbortOp ¶
func NewMpuAbortOp(txId TxId, keys []string, uploadIds []string) MpuAbortOp
func (MpuAbortOp) GetCaller ¶
func (o MpuAbortOp) GetCaller(n *NodeServer) RpcCaller
func (MpuAbortOp) GetLeader ¶
func (o MpuAbortOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (MpuAbortOp) GetTxId ¶
func (o MpuAbortOp) GetTxId() TxId
func (MpuAbortOp) RetToMsg ¶
func (o MpuAbortOp) RetToMsg(interface{}, RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type MpuAddOp ¶
type MpuAddOp struct {
// contains filtered or unexported fields
}
func NewMpuAddOp ¶
func (MpuAddOp) GetCaller ¶
func (o MpuAddOp) GetCaller(n *NodeServer) RpcCaller
func (MpuAddOp) GetLeader ¶
func (o MpuAddOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (MpuAddOp) RetToMsg ¶
func (o MpuAddOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type MpuContext ¶
type MpuContext struct {
// contains filtered or unexported fields
}
func (*MpuContext) WaitRet ¶
func (c *MpuContext) WaitRet(n *NodeServer) (ret []MpuAddOut, r RaftBasicReply)
type MultipartBlobAbortOutput ¶
type MultipartBlobAbortOutput struct {
RequestId string
}
type MultipartBlobAddInput ¶
type MultipartBlobAddInput struct { Commit *MultipartBlobCommitInput PartNumber uint32 Body io.ReadSeeker Size uint64 // GCS wants to know part putSize Last bool // GCS needs to know if this part is the last one Offset uint64 // ADLv2 needs to know offset }
type MultipartBlobAddOutput ¶
type MultipartBlobAddOutput struct {
RequestId string
}
type MultipartBlobBeginInput ¶
type MultipartExpireInput ¶
type MultipartExpireInput struct { }
type MultipartExpireOutput ¶
type MultipartExpireOutput struct {
RequestId string
}
type MyRandString ¶
type MyRandString struct {
// contains filtered or unexported fields
}
func (*MyRandString) Get ¶
func (r *MyRandString) Get(digit int64) string
type NoOpCommand ¶
type NoOpCommand struct { }
func NewNoOpCommand ¶
func NewNoOpCommand() NoOpCommand
func (NoOpCommand) Apply ¶
func (c NoOpCommand) Apply(*NodeServer, ExtLogCommandImpl)
func (NoOpCommand) GetCmdId ¶
func (c NoOpCommand) GetCmdId() uint16
func (NoOpCommand) GetExtPayloadSize ¶
func (c NoOpCommand) GetExtPayloadSize() uint8
func (NoOpCommand) SetExtPayload ¶
func (c NoOpCommand) SetExtPayload([]byte)
type NodeServer ¶
type NodeServer struct { api.UnimplementedObjcacheApiServer // contains filtered or unexported fields }
func NewNodeServer ¶
func NewNodeServer(back *ObjCacheBackend, args *common.ObjcacheCmdlineArgs, flags *common.ObjcacheConfig) *NodeServer
func (*NodeServer) AbortWriteObject ¶
func (n *NodeServer) AbortWriteObject(recordMap map[string][]*common.StagingChunkMsg)
func (*NodeServer) CheckReset ¶
func (n *NodeServer) CheckReset() (ok bool)
func (*NodeServer) CreateObject ¶
func (n *NodeServer) CreateObject(parentKey string, parentInodeKey InodeKeyType, name string, childInodeKey InodeKeyType, mode uint32) (meta *WorkingMeta, err error)
func (*NodeServer) EndOp ¶
func (n *NodeServer) EndOp()
func (*NodeServer) EvictionThread ¶
func (n *NodeServer) EvictionThread(cacheCapacityBytes int64)
func (*NodeServer) ExecDataRpc ¶
func (n *NodeServer) ExecDataRpc(msg RpcMsg, sa common.NodeAddrInet4, fd int, pipeFds [2]int, state *ReadRpcMsgState) (noData bool)
func (*NodeServer) ExecRpcThread ¶
func (n *NodeServer) ExecRpcThread(msg RpcMsg, sa common.NodeAddrInet4, fd int)
func (*NodeServer) FlushObject ¶
func (n *NodeServer) FlushObject(inodeKey InodeKeyType, records []*common.UpdateChunkRecordMsg, mTime int64, mode uint32) (meta *WorkingMeta, err error)
func (*NodeServer) FlusherThread ¶
func (n *NodeServer) FlusherThread()
func (*NodeServer) ForceStop ¶
func (n *NodeServer) ForceStop()
func (*NodeServer) GetApiIpAndPort ¶
func (n *NodeServer) GetApiIpAndPort(RpcMsg) *common.GetApiIpAndPortRet
func (*NodeServer) GetApiIpAndPortRemote ¶
func (n *NodeServer) GetApiIpAndPortRemote(node RaftNode) (apiAddr string, apiPort int, reply int32)
func (*NodeServer) GetApiPort ¶
func (n *NodeServer) GetApiPort(leader RaftNode) (apiPort int, reply int32)
func (*NodeServer) GetConfig ¶
func (n *NodeServer) GetConfig(context.Context, *api.Void) (*api.GetConfigRet, error)
func (*NodeServer) GetMeta ¶
func (n *NodeServer) GetMeta(inodeKey InodeKeyType, key string, parent InodeKeyType) (*WorkingMeta, map[string]InodeKeyType, error)
func (*NodeServer) GetTrackerNode ¶
func (n *NodeServer) GetTrackerNode(context.Context, *api.Void) (*api.GetTrackerNodeRet, error)
func (*NodeServer) HardLinkObject ¶
func (n *NodeServer) HardLinkObject(srcInodeId fuseops.InodeID, srcParent InodeKeyType, dstParentKey string, dstParentInodeId fuseops.InodeID, dstName string, childInodeKey InodeKeyType) (meta *WorkingMeta, err error)
func (*NodeServer) Init ¶
func (n *NodeServer) Init(back *ObjCacheBackend) error
func (*NodeServer) LockNode ¶
func (n *NodeServer) LockNode()
func (*NodeServer) PersistAllDirty ¶
func (n *NodeServer) PersistAllDirty()
func (*NodeServer) PersistObject ¶
func (n *NodeServer) PersistObject(inodeId fuseops.InodeID) (meta *WorkingMeta, err error)
func (*NodeServer) PrefetchChunk ¶
func (n *NodeServer) PrefetchChunk(h MetaRWHandler, offset int64, length int64)
func (*NodeServer) ReadAheadChunk ¶
func (n *NodeServer) ReadAheadChunk(h MetaRWHandler, offset int64, size int64)
func (*NodeServer) ReadChunk ¶
func (n *NodeServer) ReadChunk(h MetaRWHandler, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
func (*NodeServer) Rejuvenate ¶
func (*NodeServer) RemoveInodeMetadataKey ¶
func (n *NodeServer) RemoveInodeMetadataKey(_ fuseops.InodeID, _ string) error
func (*NodeServer) RenameObject ¶
func (n *NodeServer) RenameObject(srcParentKey string, srcParent InodeKeyType, dstParentKey string, dstParentId fuseops.InodeID, srcName string, dstName string, childInodeKey InodeKeyType) (err error)
func (*NodeServer) RequestJoin ¶
func (n *NodeServer) RequestJoin(_ context.Context, args *api.RequestJoinArgs) (*api.ApiRet, error)
func (*NodeServer) RequestJoinLocal ¶
func (n *NodeServer) RequestJoinLocal(headWorkerAddr string, headWorkerPort int) error
func (*NodeServer) RequestLeave ¶
func (n *NodeServer) RequestLeave() int32
func (*NodeServer) RequestRemoveNode ¶
func (n *NodeServer) RequestRemoveNode(_ context.Context, args *api.RequestLeaveArgs) (*api.ApiRet, error)
func (*NodeServer) SetFs ¶
func (n *NodeServer) SetFs(fs *ObjcacheFileSystem)
func (*NodeServer) SetInodeMetadataKey ¶
func (*NodeServer) Shutdown ¶
func (n *NodeServer) Shutdown(deleteStateFile bool) bool
Shutdown NOTE: Shutdown grace period is often very short (e.g., 30 sec in k8s). So, heavy tasks must be avoided so as not to be inconsistent.
func (*NodeServer) StartGrpcServer ¶
func (n *NodeServer) StartGrpcServer() error
func (*NodeServer) TerminateThread ¶
func (n *NodeServer) TerminateThread()
func (*NodeServer) TruncateObject ¶
func (n *NodeServer) TruncateObject(inodeId fuseops.InodeID, size int64) (meta *WorkingMeta, err error)
func (*NodeServer) TryBeginOp ¶
func (n *NodeServer) TryBeginOp() bool
func (*NodeServer) TryLockNode ¶
func (n *NodeServer) TryLockNode() bool
func (*NodeServer) UnlinkObject ¶
func (n *NodeServer) UnlinkObject(parentFullPath string, parentId fuseops.InodeID, name string, childKey InodeKeyType) (err error)
func (*NodeServer) UnlockNode ¶
func (n *NodeServer) UnlockNode()
func (*NodeServer) UpdateNodeListAsClient ¶
func (n *NodeServer) UpdateNodeListAsClient() error
func (*NodeServer) UpdateObjectAttr ¶
func (n *NodeServer) UpdateObjectAttr(inodeKeyType InodeKeyType, mode uint32, ts int64) (meta *WorkingMeta, err error)
func (*NodeServer) VectorReadFastPath ¶
func (n *NodeServer) VectorReadFastPath(h MetaRWHandler, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
func (*NodeServer) WaitNodeUnlocked ¶
func (n *NodeServer) WaitNodeUnlocked()
func (*NodeServer) WaitShutdown ¶
func (n *NodeServer) WaitShutdown()
func (*NodeServer) WriteChunk ¶
func (n *NodeServer) WriteChunk(inodeKey InodeKeyType, chunkSize int64, offset int64, size int64, buf []byte) ([]*common.UpdateChunkRecordMsg, int32)
type ObjCacheBackend ¶
type ObjCacheBackend struct {
// contains filtered or unexported fields
}
func NewObjCache ¶
func NewObjCache(secretFile string, debugS3 bool, bufferSize int) (*ObjCacheBackend, error)
func NewObjCacheFromSecrets ¶
func NewObjCacheFromSecrets(buckets []BucketCredential, debugS3 bool, bufferSize int) (*ObjCacheBackend, error)
func (*ObjCacheBackend) GetBucketKey ¶
func (s *ObjCacheBackend) GetBucketKey(path string) (string, string)
func (*ObjCacheBackend) Init ¶
func (s *ObjCacheBackend) Init(key string) error
type ObjcacheFileSystem ¶
type ObjcacheFileSystem struct {
// contains filtered or unexported fields
}
func GetFSWithoutMount ¶
func GetFSWithoutMount(args *common.ObjcacheCmdlineArgs, flags *common.ObjcacheConfig) (fs *ObjcacheFileSystem, err error)
func NewObjcacheFileSystem ¶
func NewObjcacheFileSystem(args *common.ObjcacheCmdlineArgs, flags *common.ObjcacheConfig) (*ObjcacheFileSystem, error)
func (*ObjcacheFileSystem) BatchForget ¶
func (fs *ObjcacheFileSystem) BatchForget(_ context.Context, op *fuseops.BatchForgetOp) error
func (*ObjcacheFileSystem) CheckReset ¶
func (fs *ObjcacheFileSystem) CheckReset() (ok bool)
func (*ObjcacheFileSystem) CreateFile ¶
func (fs *ObjcacheFileSystem) CreateFile(_ context.Context, op *fuseops.CreateFileOp) (err error)
func (*ObjcacheFileSystem) CreateLink ¶
func (fs *ObjcacheFileSystem) CreateLink(_ context.Context, op *fuseops.CreateLinkOp) (err error)
func (*ObjcacheFileSystem) CreateSymlink ¶
func (fs *ObjcacheFileSystem) CreateSymlink(_ context.Context, op *fuseops.CreateSymlinkOp) (err error)
func (*ObjcacheFileSystem) Destroy ¶
func (fs *ObjcacheFileSystem) Destroy()
func (*ObjcacheFileSystem) EndReset ¶
func (fs *ObjcacheFileSystem) EndReset()
func (*ObjcacheFileSystem) Fallocate ¶
func (fs *ObjcacheFileSystem) Fallocate(_ context.Context, op *fuseops.FallocateOp) (err error)
func (*ObjcacheFileSystem) FlushFile ¶
func (fs *ObjcacheFileSystem) FlushFile(_ context.Context, op *fuseops.FlushFileOp) (err error)
func (*ObjcacheFileSystem) ForgetInode ¶
func (fs *ObjcacheFileSystem) ForgetInode(_ context.Context, op *fuseops.ForgetInodeOp) error
func (*ObjcacheFileSystem) FuseMount ¶
func (fs *ObjcacheFileSystem) FuseMount(args *common.ObjcacheCmdlineArgs, flags *common.ObjcacheConfig) (err error)
func (*ObjcacheFileSystem) GetInodeAttributes ¶
func (fs *ObjcacheFileSystem) GetInodeAttributes(_ context.Context, op *fuseops.GetInodeAttributesOp) (err error)
func (*ObjcacheFileSystem) GetOpenInodes ¶
func (fs *ObjcacheFileSystem) GetOpenInodes() map[InodeKeyType]bool
func (*ObjcacheFileSystem) GetXattr ¶
func (fs *ObjcacheFileSystem) GetXattr(_ context.Context, op *fuseops.GetXattrOp) (err error)
func (*ObjcacheFileSystem) InitNodeListAsClient ¶
func (fs *ObjcacheFileSystem) InitNodeListAsClient() (err error)
func (*ObjcacheFileSystem) ListXattr ¶
func (fs *ObjcacheFileSystem) ListXattr(_ context.Context, op *fuseops.ListXattrOp) (err error)
func (*ObjcacheFileSystem) LookUpInode ¶
func (fs *ObjcacheFileSystem) LookUpInode(_ context.Context, op *fuseops.LookUpInodeOp) (err error)
func (*ObjcacheFileSystem) OpenFile ¶
func (fs *ObjcacheFileSystem) OpenFile(_ context.Context, op *fuseops.OpenFileOp) (err error)
func (*ObjcacheFileSystem) PostOp ¶
func (fs *ObjcacheFileSystem) PostOp(_ context.Context, op interface{})
func (*ObjcacheFileSystem) ReadFile ¶
func (fs *ObjcacheFileSystem) ReadFile(_ context.Context, op *fuseops.ReadFileOp) (err error)
func (*ObjcacheFileSystem) ReadSymlink ¶
func (fs *ObjcacheFileSystem) ReadSymlink(_ context.Context, op *fuseops.ReadSymlinkOp) (err error)
func (*ObjcacheFileSystem) ReleaseDirHandle ¶
func (fs *ObjcacheFileSystem) ReleaseDirHandle(_ context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
func (*ObjcacheFileSystem) ReleaseFileHandle ¶
func (fs *ObjcacheFileSystem) ReleaseFileHandle(_ context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
func (*ObjcacheFileSystem) RemoveXattr ¶
func (fs *ObjcacheFileSystem) RemoveXattr(_ context.Context, op *fuseops.RemoveXattrOp) (err error)
func (*ObjcacheFileSystem) RequestJoinLocal ¶
func (fs *ObjcacheFileSystem) RequestJoinLocal(headWorkerAddr string, headWorkerPort int) (err error)
func (*ObjcacheFileSystem) Reset ¶
func (fs *ObjcacheFileSystem) Reset(shutdown bool) error
func (*ObjcacheFileSystem) SetInodeAttributes ¶
func (fs *ObjcacheFileSystem) SetInodeAttributes(_ context.Context, op *fuseops.SetInodeAttributesOp) (err error)
func (*ObjcacheFileSystem) SetRoot ¶
func (fs *ObjcacheFileSystem) SetRoot() error
func (*ObjcacheFileSystem) SetXattr ¶
func (fs *ObjcacheFileSystem) SetXattr(_ context.Context, op *fuseops.SetXattrOp) (err error)
func (*ObjcacheFileSystem) SyncFile ¶
func (fs *ObjcacheFileSystem) SyncFile(_ context.Context, op *fuseops.SyncFileOp) (err error)
func (*ObjcacheFileSystem) WaitReset ¶
func (fs *ObjcacheFileSystem) WaitReset()
func (*ObjcacheFileSystem) WriteFile ¶
func (fs *ObjcacheFileSystem) WriteFile(_ context.Context, op *fuseops.WriteFileOp) (err error)
type ObjcacheProc ¶
type ObjcacheProc struct {
// contains filtered or unexported fields
}
func (*ObjcacheProc) CheckReset ¶
func (p *ObjcacheProc) CheckReset() (ok bool)
type OnDiskLog ¶
type OnDiskLog struct {
// contains filtered or unexported fields
}
func (*OnDiskLog) AppendSingleBuffer ¶
func (d *OnDiskLog) AppendSingleBuffer(buf []byte) (vec *DiskWriteVector, sizeIncrease int64, err error)
func (*OnDiskLog) BeginAppendSplice ¶
func (d *OnDiskLog) BeginAppendSplice(srcFd int, size int64) (*DiskWriteVector, error)
func (*OnDiskLog) BeginAppendWrite ¶
func (d *OnDiskLog) BeginAppendWrite(buf []byte) (*DiskWriteVector, error)
func (*OnDiskLog) BeginRandomSplice ¶
func (*OnDiskLog) BeginRandomWrite ¶
func (d *OnDiskLog) BeginRandomWrite(buf []byte, logOffset int64) (*DiskWriteVector, error)
func (*OnDiskLog) CheckReset ¶
func (*OnDiskLog) EndWrite ¶
func (d *OnDiskLog) EndWrite(vec *DiskWriteVector) (sizeIncrease int64, err error)
func (*OnDiskLog) ReadNoCache ¶
func (*OnDiskLog) ReserveAppendWrite ¶
func (*OnDiskLog) SendZeroCopy ¶
func (*OnDiskLog) Splice ¶
func (d *OnDiskLog) Splice(vec *DiskWriteVector, pipeFds [2]int, bufOff *int32) (err error)
func (*OnDiskLog) WaitWrites ¶
func (*OnDiskLog) Write ¶
func (d *OnDiskLog) Write(vec *DiskWriteVector) error
func (*OnDiskLog) WriteSingleBuffer ¶
type OnDiskLogger ¶
type OnDiskLogger struct {
// contains filtered or unexported fields
}
func NewOnDiskLogger ¶
func NewOnDiskLogger(filePrefix string) *OnDiskLogger
func (*OnDiskLogger) AddDiskUsage ¶
func (c *OnDiskLogger) AddDiskUsage(size int64) int64
func (*OnDiskLogger) AppendSingleBuffer ¶
func (c *OnDiskLogger) AppendSingleBuffer(logId LogIdType, buf []byte) (logOffset int64, err error)
func (*OnDiskLogger) CheckReset ¶
func (c *OnDiskLogger) CheckReset() (ok bool)
func (*OnDiskLogger) Clear ¶
func (c *OnDiskLogger) Clear()
func (*OnDiskLogger) Freeze ¶
func (c *OnDiskLogger) Freeze(logId LogIdType)
func (*OnDiskLogger) GetDiskLog ¶
func (c *OnDiskLogger) GetDiskLog(logId LogIdType, maxNrCache int, maxWriters int) (disk *OnDiskLog)
func (*OnDiskLogger) GetDiskUsage ¶
func (c *OnDiskLogger) GetDiskUsage() int64
func (*OnDiskLogger) GetSize ¶
func (c *OnDiskLogger) GetSize(logId LogIdType) (size int64)
func (*OnDiskLogger) IsFreezed ¶
func (c *OnDiskLogger) IsFreezed(logId LogIdType) bool
func (*OnDiskLogger) PutDiskLog ¶
func (c *OnDiskLogger) PutDiskLog(logId LogIdType, vec *DiskWriteVector, sizeIncrease int64)
func (*OnDiskLogger) ReadNoCache ¶
func (*OnDiskLogger) Remove ¶
func (c *OnDiskLogger) Remove(logId LogIdType) (size int64, err error)
func (*OnDiskLogger) ReserveRange ¶
func (c *OnDiskLogger) ReserveRange(logId LogIdType, logBytes int64) (offset int64)
func (*OnDiskLogger) Reset ¶
func (c *OnDiskLogger) Reset()
func (*OnDiskLogger) SendZeroCopy ¶
func (*OnDiskLogger) WriteSingleBuffer ¶
func (c *OnDiskLogger) WriteSingleBuffer(logId LogIdType, buf []byte, logOffset int64) error
func (*OnDiskLogger) ZeroCopyRead ¶
type OnDiskState ¶
type OnDiskState struct {
// contains filtered or unexported fields
}
func NewOnDiskState ¶
func NewOnDiskState(rootDir string, selfId uint32, stateName string) (*OnDiskState, int32)
func (*OnDiskState) CheckReset ¶
func (s *OnDiskState) CheckReset() (ok bool)
func (*OnDiskState) Clean ¶
func (s *OnDiskState) Clean()
func (*OnDiskState) Get ¶
func (s *OnDiskState) Get() uint32
func (*OnDiskState) Increment ¶
func (s *OnDiskState) Increment() int32
func (*OnDiskState) Reset ¶
func (s *OnDiskState) Reset() int32
func (*OnDiskState) Set ¶
func (s *OnDiskState) Set(value uint32) int32
type PageBuffer ¶
type PageBuffer struct { Buf []byte // contains filtered or unexported fields }
func GetPageBuffer ¶
func GetPageBuffer(size int64) (*PageBuffer, error)
func (*PageBuffer) AsSlice ¶
func (p *PageBuffer) AsSlice() SlicedPageBuffer
func (*PageBuffer) Down ¶
func (p *PageBuffer) Down() (count int32)
func (*PageBuffer) IsEvictable ¶
func (p *PageBuffer) IsEvictable() bool
func (*PageBuffer) Up ¶
func (p *PageBuffer) Up()
Up increments refCount to prevent Buf from begin released unexpectedly.
type PagePool ¶
type PagePool struct {
// contains filtered or unexported fields
}
func NewPagePool ¶
func (*PagePool) CheckReset ¶
func (*PagePool) Get ¶
func (p *PagePool) Get() (*PageBuffer, error)
func (*PagePool) Put ¶
func (p *PagePool) Put(buf *PageBuffer)
type ParticipantOp ¶
type ParticipantOp interface { GetTxId() TxId GetLeader(*NodeServer, *RaftNodeList) (RaftNode, bool) RetToMsg(interface{}, RaftBasicReply) (proto.Message, []SlicedPageBuffer) GetCaller(*NodeServer) RpcCaller // contains filtered or unexported methods }
func NewAbortParticipantOpFromMsg ¶
func NewAbortParticipantOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewCommitDeleteChunkOpFromMsg ¶
func NewCommitDeleteChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewCommitExpandChunkOpFromMsg ¶
func NewCommitExpandChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewCommitParticipantOpFromMsg ¶
func NewCommitParticipantOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewCommitPersistChunkOpFromMsg ¶
func NewCommitPersistChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewCommitUpdateChunkOpFromMsg ¶
func NewCommitUpdateChunkOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewCreateChildMetaOpFromMsg ¶
func NewCreateChildMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewCreateMetaOpFromMsg ¶
func NewCreateMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewDeleteMetaOpFromMsg ¶
func NewDeleteMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewFillNodeListOpFromMsg ¶
func NewFillNodeListOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewJoinMigrationOpFromMsg ¶
func NewJoinMigrationOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewLeaveMigrationOpFromMsg ¶
func NewLeaveMigrationOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewMpuAddOpFromMsg ¶
func NewMpuAddOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewRenameMetaOpFromMsg ¶
func NewRenameMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewTruncateMetaOpFromMsg ¶
func NewTruncateMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewUnlinkMetaOpFromMsg ¶
func NewUnlinkMetaOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewUpdateMetaKeyOpFromMsg ¶
func NewUpdateMetaKeyOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewUpdateMetaSizeOpFromMsg ¶
func NewUpdateMetaSizeOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
func NewUpdateNodeListOpFromMsg ¶
func NewUpdateNodeListOpFromMsg(msg RpcMsg) (ParticipantOp, uint64, int32)
type ParticipantTx ¶
type ParticipantTx struct {
// contains filtered or unexported fields
}
func NewParticipantTx ¶
func NewParticipantTx(txRet TxRet) ParticipantTx
func NewParticipantTxFromMsg ¶
func NewParticipantTxFromMsg(msg *common.ParticipantTxMsg) ParticipantTx
type PersistChunkCommand ¶
type PersistChunkCommand struct {
// contains filtered or unexported fields
}
func NewPersistChunkCommand ¶
func NewPersistChunkCommand(inodeKey InodeKeyType, offsets []int64, chunkVers []uint32) PersistChunkCommand
func (PersistChunkCommand) Commit ¶
func (c PersistChunkCommand) Commit(n *NodeServer)
func (PersistChunkCommand) GetExtCmdId ¶
func (c PersistChunkCommand) GetExtCmdId() uint16
func (PersistChunkCommand) GetTxId ¶
func (c PersistChunkCommand) GetTxId() TxId
func (PersistChunkCommand) IsSingleShot ¶
func (c PersistChunkCommand) IsSingleShot() bool
func (PersistChunkCommand) NeedTwoPhaseCommit ¶
func (c PersistChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type PersistCoordinatorCommand ¶
type PersistCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewPersistCoordinatorCommand ¶
func NewPersistCoordinatorCommand(txId TxId, inodeKey InodeKeyType, metaVer uint32, ts int64, keys []string, chunks []*common.PersistedChunkInfoMsg, commitTxId TxId) PersistCoordinatorCommand
func (PersistCoordinatorCommand) Commit ¶
func (c PersistCoordinatorCommand) Commit(n *NodeServer)
func (PersistCoordinatorCommand) GetExtCmdId ¶
func (c PersistCoordinatorCommand) GetExtCmdId() uint16
func (PersistCoordinatorCommand) GetTxId ¶
func (c PersistCoordinatorCommand) GetTxId() TxId
func (PersistCoordinatorCommand) IsSingleShot ¶
func (c PersistCoordinatorCommand) IsSingleShot() bool
func (PersistCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c PersistCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
func (PersistCoordinatorCommand) RemoteCommit ¶
func (c PersistCoordinatorCommand) RemoteCommit(raftGroup *RaftGroupMgr) []ParticipantOp
type PrefetchChunkOp ¶
type PrefetchChunkOp struct {
// contains filtered or unexported fields
}
func NewPrefetchChunkOp ¶
func NewPrefetchChunkOp(leader RaftNode, offset int64, length int64, h MetaRWHandler, nodeListVer uint64) PrefetchChunkOp
func (PrefetchChunkOp) GetCaller ¶
func (o PrefetchChunkOp) GetCaller(*NodeServer) RpcCaller
func (PrefetchChunkOp) GetLeader ¶
func (o PrefetchChunkOp) GetLeader(*NodeServer, *RaftNodeList) (RaftNode, bool)
func (PrefetchChunkOp) RetToMsg ¶
func (o PrefetchChunkOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type PrepareRpcCaller ¶
type PrepareRpcCaller struct {
// contains filtered or unexported fields
}
func NewPrepareRpcCaller ¶
func NewPrepareRpcCaller(fn ParticipantOp, remoteTimeout time.Duration, nodeLock bool) PrepareRpcCaller
func (PrepareRpcCaller) ExecLocal ¶
func (c PrepareRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (PrepareRpcCaller) ExecLocalInRpc ¶
func (c PrepareRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (PrepareRpcCaller) ExecRemote ¶
func (c PrepareRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (PrepareRpcCaller) GetLeader ¶
func (c PrepareRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
func (PrepareRpcCaller) TryNext ¶
func (c PrepareRpcCaller) TryNext(n *NodeServer, i int) bool
type PutBlobInput ¶
type PutBlobOutput ¶
type RaftBasicReply ¶
type RaftBasicReply struct {
// contains filtered or unexported fields
}
func NewRaftBasicReply ¶
func NewRaftBasicReply(Status int32, leader *common.LeaderNodeMsg) RaftBasicReply
func (*RaftBasicReply) GetApiNodeMsg ¶
func (r *RaftBasicReply) GetApiNodeMsg(groupId string) *api.ApiNodeMsg
func (*RaftBasicReply) GetLeaderNodeMsg ¶
func (r *RaftBasicReply) GetLeaderNodeMsg() *common.LeaderNodeMsg
func (*RaftBasicReply) GetNodeMsg ¶
func (r *RaftBasicReply) GetNodeMsg(groupId string) *common.NodeMsg
type RaftCommand ¶
type RaftCommand interface { GetCmdId() uint16 GetExtPayloadSize() uint8 SetExtPayload([]byte) Apply(*NodeServer, ExtLogCommandImpl) }
func NewAddServerCommandFromBytes ¶
func NewAddServerCommandFromBytes(l *AppendEntryCommand) RaftCommand
func NewCommitCommandFromBytes ¶
func NewCommitCommandFromBytes(l *AppendEntryCommand) RaftCommand
func NewExtLogCommandFromBytes ¶
func NewExtLogCommandFromBytes(l *AppendEntryCommand) RaftCommand
func NewNoOpCommandFromBytes ¶
func NewNoOpCommandFromBytes(_ *AppendEntryCommand) RaftCommand
func NewRemoveServerCommandFromBytes ¶
func NewRemoveServerCommandFromBytes(l *AppendEntryCommand) RaftCommand
func NewResetExtCommandFromBytes ¶
func NewResetExtCommandFromBytes(l *AppendEntryCommand) RaftCommand
type RaftGroupMgr ¶
type RaftGroupMgr struct {
// contains filtered or unexported fields
}
func NewRaftGroupMgr ¶
func NewRaftGroupMgr(groupId string, nrVirt int) *RaftGroupMgr
func (*RaftGroupMgr) Add ¶
func (m *RaftGroupMgr) Add(node RaftNode)
func (*RaftGroupMgr) BeginRaftRead ¶
func (m *RaftGroupMgr) BeginRaftRead(raft *RaftInstance, nodeListVer uint64) (r RaftBasicReply)
func (*RaftGroupMgr) CheckReset ¶
func (m *RaftGroupMgr) CheckReset() (ok bool)
func (*RaftGroupMgr) Clean ¶
func (m *RaftGroupMgr) Clean()
func (*RaftGroupMgr) CommitUpdate ¶
func (m *RaftGroupMgr) CommitUpdate(nodes []RaftNode, isAdd bool, nodeListVer uint64)
func (*RaftGroupMgr) GetChunkOwnerGroupId ¶
func (m *RaftGroupMgr) GetChunkOwnerGroupId(inodeKey InodeKeyType, offset int64, chunkSize int64) (string, bool)
func (*RaftGroupMgr) GetGroupLeader ¶
func (m *RaftGroupMgr) GetGroupLeader(groupId string, l *RaftNodeList) (RaftNode, bool)
func (*RaftGroupMgr) GetGroupLeaderNoLock ¶
func (m *RaftGroupMgr) GetGroupLeaderNoLock(groupId string, l *RaftNodeList) (RaftNode, bool)
func (*RaftGroupMgr) GetNodeListLocal ¶
func (m *RaftGroupMgr) GetNodeListLocal() *RaftNodeList
GetNodeListLocal must be called after raft.SyncBeforeClientQuery()
func (*RaftGroupMgr) GetNumberOfGroups ¶
func (m *RaftGroupMgr) GetNumberOfGroups() int
func (*RaftGroupMgr) GetRemovedNodeListLocal ¶
func (m *RaftGroupMgr) GetRemovedNodeListLocal(removed RaftNode) *RaftNodeList
func (*RaftGroupMgr) GetReplica ¶
func (m *RaftGroupMgr) GetReplica(leader RaftNode) (replica RaftNode, found bool)
func (*RaftGroupMgr) Remove ¶
func (m *RaftGroupMgr) Remove(nodeId uint32, groupId string)
func (*RaftGroupMgr) ResetWithRaftNodeListMsg ¶
func (m *RaftGroupMgr) ResetWithRaftNodeListMsg(msg *common.RaftNodeListMsg)
func (*RaftGroupMgr) SetNodeListDirect ¶
func (m *RaftGroupMgr) SetNodeListDirect(nodes []*api.ApiNodeMsg, nodeListVer uint64)
func (*RaftGroupMgr) UpdateLeader ¶
func (m *RaftGroupMgr) UpdateLeader(newLeader RaftNode) bool
func (*RaftGroupMgr) UpdateNodeListLocal ¶
func (m *RaftGroupMgr) UpdateNodeListLocal(isAdd bool, nodes []RaftNode, nodeListVer uint64)
UpdateNodeListLocal appends a new server with a group (the group can be duplicated in the existing entry)
type RaftInstance ¶
type RaftInstance struct {
// contains filtered or unexported fields
}
func NewRaftInstance ¶
func NewRaftInstance(server *NodeServer) (*RaftInstance, uint64)
NewRaftInstance Raft Command Format: | command Id (byte) | Term (uint64) | log Index (uint64) | cmd (size returned by GetSize())
func (*RaftInstance) AddServerLocal ¶
func (n *RaftInstance) AddServerLocal(sa common.NodeAddrInet4, serverId uint32) int32
func (*RaftInstance) AppendBootstrapLogs ¶
func (n *RaftInstance) AppendBootstrapLogs(groupId string) int32
func (*RaftInstance) AppendEntriesLocal ¶
func (n *RaftInstance) AppendEntriesLocal(rc RaftCommand, extLogCmd ExtLogCommandImpl) (ret interface{}, lastLogIndex uint64, reply int32)
func (*RaftInstance) AppendEntriesRpcBottomHalf ¶
func (n *RaftInstance) AppendEntriesRpcBottomHalf(msg RpcMsg, sa common.NodeAddrInet4, fd int) (hadEntry bool)
func (*RaftInstance) AppendEntriesRpcTopHalf ¶
func (n *RaftInstance) AppendEntriesRpcTopHalf(msg RpcMsg, sa common.NodeAddrInet4, fd int) (success bool, abort bool)
func (*RaftInstance) AppendExtendedLogEntry ¶
func (n *RaftInstance) AppendExtendedLogEntry(extLogCmd ExtLogCommandImpl) int32
func (*RaftInstance) AppendInitEntry ¶
func (n *RaftInstance) AppendInitEntry(rc RaftCommand) int32
func (*RaftInstance) ApplyAll ¶
func (n *RaftInstance) ApplyAll(cmd *AppendEntryCommand, logIndex uint64, extLogCmd ExtLogCommandImpl)
func (*RaftInstance) CatchUpLog ¶
func (n *RaftInstance) CatchUpLog(sa common.NodeAddrInet4, serverId uint32, timeout time.Duration) int32
func (*RaftInstance) CheckReset ¶
func (n *RaftInstance) CheckReset() (ok bool)
func (*RaftInstance) CleanExtLogger ¶
func (n *RaftInstance) CleanExtLogger()
func (*RaftInstance) GenerateCoordinatorId ¶
func (n *RaftInstance) GenerateCoordinatorId() CoordinatorId
func (*RaftInstance) GetExtLogId ¶
func (n *RaftInstance) GetExtLogId() LogIdType
func (*RaftInstance) GetExtLogIdForLogCompaction ¶
func (n *RaftInstance) GetExtLogIdForLogCompaction() LogIdType
func (*RaftInstance) HandleAppendEntriesResponse ¶
func (n *RaftInstance) HandleAppendEntriesResponse(msg RpcMsg, sa common.NodeAddrInet4) int32
func (*RaftInstance) HandleRequestVoteResponse ¶
func (n *RaftInstance) HandleRequestVoteResponse(msg RpcMsg, sa common.NodeAddrInet4) int32
func (*RaftInstance) HeartBeatRecvThread ¶
func (n *RaftInstance) HeartBeatRecvThread(interval time.Duration)
func (*RaftInstance) HeartBeaterThread ¶
func (n *RaftInstance) HeartBeaterThread()
func (*RaftInstance) Init ¶
func (n *RaftInstance) Init(passive bool)
func (*RaftInstance) IsLeader ¶
func (n *RaftInstance) IsLeader() (r RaftBasicReply)
func (*RaftInstance) RemoveAllServerIds ¶
func (n *RaftInstance) RemoveAllServerIds() int32
func (*RaftInstance) RemoveServerLocal ¶
func (n *RaftInstance) RemoveServerLocal(serverId uint32) int32
func (*RaftInstance) ReplayAll ¶
func (n *RaftInstance) ReplayAll() int32
func (*RaftInstance) ReplicateLog ¶
func (n *RaftInstance) ReplicateLog(lastLogIndex uint64, added *uint32, addedSa *common.NodeAddrInet4, removedNodeId *uint32, cmd *AppendEntryCommand, extLogCmd ExtLogCommandImpl) (reply int32)
func (*RaftInstance) RequestVoteRpc ¶
func (n *RaftInstance) RequestVoteRpc(msg RpcMsg, sa common.NodeAddrInet4, fd int) bool
func (*RaftInstance) SetExt ¶
func (n *RaftInstance) SetExt(logId uint32, seqNum uint32)
func (*RaftInstance) Shutdown ¶
func (n *RaftInstance) Shutdown()
func (*RaftInstance) StartVoting ¶
func (n *RaftInstance) StartVoting()
func (*RaftInstance) StepDown ¶
func (n *RaftInstance) StepDown(lastLogIndex uint64)
func (*RaftInstance) SwitchExtLog ¶
func (n *RaftInstance) SwitchExtLog(logId uint32)
func (*RaftInstance) SwitchFileAndAppendEntriesLocal ¶
func (n *RaftInstance) SwitchFileAndAppendEntriesLocal(rc RaftCommand, extLogCmd ExtLogCommandImpl) (ret interface{}, lastLogIndex uint64, reply int32)
func (*RaftInstance) SyncBeforeClientQuery ¶
func (n *RaftInstance) SyncBeforeClientQuery() (r RaftBasicReply)
SyncBeforeClientQuery Original method is ClientQuery, which is invoked by clients to query the replicated state (read-only commands). 6.4 Note: no GRPC is provided and only sync code for linearizability is implemented. must be accessed by leader's context.
func (*RaftInstance) WaitPreviousCommits ¶
func (n *RaftInstance) WaitPreviousCommits()
type RaftLogger ¶
type RaftLogger struct {
// contains filtered or unexported fields
}
func NewRaftLogger ¶
func NewRaftLogger(rootDir string, filePrefix string, maxNrCache int) (ret *RaftLogger, reply int32)
func (*RaftLogger) AppendCommand ¶
func (f *RaftLogger) AppendCommand(cmd AppendEntryCommand) (logIndex uint64, reply int32)
func (*RaftLogger) CheckReset ¶
func (f *RaftLogger) CheckReset() (ok bool)
func (*RaftLogger) Clear ¶
func (f *RaftLogger) Clear()
func (*RaftLogger) CompactLog ¶
func (f *RaftLogger) CompactLog() (reply int32)
func (*RaftLogger) GetCurrentLogLength ¶
func (f *RaftLogger) GetCurrentLogLength() uint64
func (*RaftLogger) LoadCommandAt ¶
func (f *RaftLogger) LoadCommandAt(logIndex uint64) (cmd AppendEntryCommand, reply int32)
func (*RaftLogger) Shrink ¶
func (f *RaftLogger) Shrink(logIndex uint64) (reply int32)
func (*RaftLogger) SwitchFileAndAppendCommand ¶
func (f *RaftLogger) SwitchFileAndAppendCommand(cmd AppendEntryCommand) (logIndex uint64, reply int32)
type RaftNode ¶
type RaftNode struct {
// contains filtered or unexported fields
}
func NewRaftNodeFromApiMsg ¶
func NewRaftNodeFromApiMsg(msg *api.ApiNodeMsg) RaftNode
func NewRaftNodeFromMsg ¶
type RaftNodeList ¶
type RaftNodeList struct {
// contains filtered or unexported fields
}
func NewRaftNodeList ¶
func NewRaftNodeList(ring *hashring.HashRing, version uint64) *RaftNodeList
func NewRaftNodeListFromMsg ¶
func NewRaftNodeListFromMsg(nrVirt int, msg *common.RaftNodeListMsg) *RaftNodeList
func (*RaftNodeList) CheckReset ¶
func (r *RaftNodeList) CheckReset() (ok bool)
type ReadChunkOp ¶
type ReadChunkOp struct {
// contains filtered or unexported fields
}
func NewReadChunkOp ¶
func NewReadChunkOp(h MetaRWHandler, offset int64, size int, blocking bool, readAhead bool) ReadChunkOp
func (ReadChunkOp) GetCaller ¶
func (o ReadChunkOp) GetCaller(*NodeServer) RpcCaller
func (ReadChunkOp) GetLeader ¶
func (o ReadChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (ReadChunkOp) RetToMsg ¶
func (o ReadChunkOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type ReadChunkOpRet ¶
type ReadChunkOpRet struct {
// contains filtered or unexported fields
}
type ReadRpcMsgState ¶
type ReadRpcMsgState struct {
// contains filtered or unexported fields
}
type ReadSeekerCloser ¶
type ReadSeekerCloser struct {
io.ReadSeeker
}
func (*ReadSeekerCloser) Close ¶
func (r *ReadSeekerCloser) Close() error
type ReaderBufferCache ¶
type ReaderBufferCache struct {
// contains filtered or unexported fields
}
func NewReaderBufferCache ¶
func NewReaderBufferCache(flags *common.ObjcacheConfig) *ReaderBufferCache
func (*ReaderBufferCache) CheckReset ¶
func (c *ReaderBufferCache) CheckReset() (ok bool)
func (*ReaderBufferCache) Delete ¶
func (c *ReaderBufferCache) Delete(logId LogIdType) (size int64)
func (*ReaderBufferCache) DropAll ¶
func (c *ReaderBufferCache) DropAll()
func (*ReaderBufferCache) EndFill ¶
func (c *ReaderBufferCache) EndFill(logId LogIdType, offset int64)
func (*ReaderBufferCache) EndFillWithPut ¶
func (c *ReaderBufferCache) EndFillWithPut(reader *BufferedDiskPageReader)
func (*ReaderBufferCache) GetCacheOrBeginFill ¶
func (c *ReaderBufferCache) GetCacheOrBeginFill(logId LogIdType, offset int64) (reader *BufferedDiskPageReader, beginFill bool)
func (*ReaderBufferCache) GetCacheWithFillWait ¶
func (c *ReaderBufferCache) GetCacheWithFillWait(logId LogIdType, stagPart *StagingChunkPart, offset int64) *BufferedDiskPageReader
func (*ReaderBufferCache) GetNewBufferedDiskPageReader ¶
func (c *ReaderBufferCache) GetNewBufferedDiskPageReader(logId LogIdType, stag *StagingChunk, blocking bool) (*BufferedDiskPageReader, error)
func (*ReaderBufferCache) ReleaseInFlightBuffer ¶
func (c *ReaderBufferCache) ReleaseInFlightBuffer(reader *BufferedDiskPageReader)
func (*ReaderBufferCache) SetEvictable ¶
func (c *ReaderBufferCache) SetEvictable(reader *BufferedDiskPageReader)
func (*ReaderBufferCache) TryBeginFill ¶
func (c *ReaderBufferCache) TryBeginFill(logId LogIdType, offset int64) (beginFill bool)
type RecordMigratedAddChunkCommand ¶
type RecordMigratedAddChunkCommand struct {
// contains filtered or unexported fields
}
func NewRecordMigratedAddChunkCommand ¶
func NewRecordMigratedAddChunkCommand(migrationId MigrationId, chunk *common.AppendCommitUpdateChunksMsg) RecordMigratedAddChunkCommand
func (RecordMigratedAddChunkCommand) Commit ¶
func (c RecordMigratedAddChunkCommand) Commit(n *NodeServer)
func (RecordMigratedAddChunkCommand) GetExtCmdId ¶
func (c RecordMigratedAddChunkCommand) GetExtCmdId() uint16
func (RecordMigratedAddChunkCommand) GetTxId ¶
func (c RecordMigratedAddChunkCommand) GetTxId() TxId
func (RecordMigratedAddChunkCommand) IsSingleShot ¶
func (c RecordMigratedAddChunkCommand) IsSingleShot() bool
func (RecordMigratedAddChunkCommand) NeedTwoPhaseCommit ¶
func (c RecordMigratedAddChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type RecordMigratedAddMetaCommand ¶
type RecordMigratedAddMetaCommand struct {
// contains filtered or unexported fields
}
func NewRecordMigratedAddMetaCommand ¶
func NewRecordMigratedAddMetaCommand(s *Snapshot) RecordMigratedAddMetaCommand
func (RecordMigratedAddMetaCommand) Commit ¶
func (c RecordMigratedAddMetaCommand) Commit(n *NodeServer)
func (RecordMigratedAddMetaCommand) GetExtCmdId ¶
func (c RecordMigratedAddMetaCommand) GetExtCmdId() uint16
func (RecordMigratedAddMetaCommand) GetTxId ¶
func (c RecordMigratedAddMetaCommand) GetTxId() TxId
func (RecordMigratedAddMetaCommand) IsSingleShot ¶
func (c RecordMigratedAddMetaCommand) IsSingleShot() bool
func (RecordMigratedAddMetaCommand) NeedTwoPhaseCommit ¶
func (c RecordMigratedAddMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type RecordMigratedRemoveChunkCommand ¶
type RecordMigratedRemoveChunkCommand struct {
// contains filtered or unexported fields
}
func NewRecordMigratedRemoveChunkCommand ¶
func NewRecordMigratedRemoveChunkCommand(migrationId MigrationId, chunks []*common.ChunkRemoveDirtyMsg) RecordMigratedRemoveChunkCommand
func (RecordMigratedRemoveChunkCommand) Commit ¶
func (c RecordMigratedRemoveChunkCommand) Commit(n *NodeServer)
func (RecordMigratedRemoveChunkCommand) GetExtCmdId ¶
func (c RecordMigratedRemoveChunkCommand) GetExtCmdId() uint16
func (RecordMigratedRemoveChunkCommand) GetTxId ¶
func (c RecordMigratedRemoveChunkCommand) GetTxId() TxId
func (RecordMigratedRemoveChunkCommand) IsSingleShot ¶
func (c RecordMigratedRemoveChunkCommand) IsSingleShot() bool
func (RecordMigratedRemoveChunkCommand) NeedTwoPhaseCommit ¶
func (c RecordMigratedRemoveChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type RecordMigratedRemoveMetaCommand ¶
type RecordMigratedRemoveMetaCommand struct {
// contains filtered or unexported fields
}
func NewRecordMigratedRemoveMetaCommand ¶
func NewRecordMigratedRemoveMetaCommand(migrationId MigrationId, inodeKeys map[InodeKeyType]bool, dirInodes []*common.InodeTreeMsg) RecordMigratedRemoveMetaCommand
func (RecordMigratedRemoveMetaCommand) Commit ¶
func (c RecordMigratedRemoveMetaCommand) Commit(n *NodeServer)
func (RecordMigratedRemoveMetaCommand) GetExtCmdId ¶
func (c RecordMigratedRemoveMetaCommand) GetExtCmdId() uint16
func (RecordMigratedRemoveMetaCommand) GetTxId ¶
func (c RecordMigratedRemoveMetaCommand) GetTxId() TxId
func (RecordMigratedRemoveMetaCommand) IsSingleShot ¶
func (c RecordMigratedRemoveMetaCommand) IsSingleShot() bool
func (RecordMigratedRemoveMetaCommand) NeedTwoPhaseCommit ¶
func (c RecordMigratedRemoveMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type RemoteBufferCache ¶
type RemoteBufferCache struct {
// contains filtered or unexported fields
}
func NewRemotePageBufferCache ¶
func NewRemotePageBufferCache(maxSize int64) *RemoteBufferCache
func (*RemoteBufferCache) CheckReset ¶
func (c *RemoteBufferCache) CheckReset() (ok bool)
func (*RemoteBufferCache) Delete ¶
func (c *RemoteBufferCache) Delete(inode InodeKeyType)
func (*RemoteBufferCache) DropAll ¶
func (c *RemoteBufferCache) DropAll()
func (*RemoteBufferCache) EndFill ¶
func (c *RemoteBufferCache) EndFill(inodeKey InodeKeyType, offset int64)
func (*RemoteBufferCache) EndFillWithPut ¶
func (c *RemoteBufferCache) EndFillWithPut(page *RemotePageBuffer)
func (*RemoteBufferCache) GetCache ¶
func (c *RemoteBufferCache) GetCache(inodeKey InodeKeyType, offset int64) (SlicedPageBuffer, bool)
func (*RemoteBufferCache) GetCacheOrBeginFill ¶
func (c *RemoteBufferCache) GetCacheOrBeginFill(inodeKey InodeKeyType, offset int64) (p *RemotePageBuffer, beginFill bool)
func (*RemoteBufferCache) GetCacheWithFillWait ¶
func (c *RemoteBufferCache) GetCacheWithFillWait(inodeKey InodeKeyType, offset int64, length int) (SlicedPageBuffer, bool)
func (*RemoteBufferCache) GetRemotePageBuffer ¶
func (c *RemoteBufferCache) GetRemotePageBuffer(inodeKey InodeKeyType, offset int64, length int64, blocking bool) (*RemotePageBuffer, error)
func (*RemoteBufferCache) Has ¶
func (c *RemoteBufferCache) Has(inodekey InodeKeyType, offset int64) bool
func (*RemoteBufferCache) ReleaseInFlightBuffer ¶
func (c *RemoteBufferCache) ReleaseInFlightBuffer(p *RemotePageBuffer)
func (*RemoteBufferCache) SetEvictable ¶
func (c *RemoteBufferCache) SetEvictable(page *RemotePageBuffer) (size int64)
type RemotePageBuffer ¶
type RemotePageBuffer struct {
// contains filtered or unexported fields
}
func (*RemotePageBuffer) AsSlice ¶
func (r *RemotePageBuffer) AsSlice(dec func(interface{})) SlicedPageBuffer
type RemoveBucketInput ¶
type RemoveBucketInput struct { }
type RemoveBucketOutput ¶
type RemoveBucketOutput struct {
RequestId string
}
type RemoveNonDirtyChunksCommand ¶
type RemoveNonDirtyChunksCommand struct {
// contains filtered or unexported fields
}
func NewRemoveNonDirtyChunksCommand ¶
func NewRemoveNonDirtyChunksCommand(inodeKeys []uint64) RemoveNonDirtyChunksCommand
func (RemoveNonDirtyChunksCommand) Commit ¶
func (c RemoveNonDirtyChunksCommand) Commit(n *NodeServer)
func (RemoveNonDirtyChunksCommand) GetExtCmdId ¶
func (c RemoveNonDirtyChunksCommand) GetExtCmdId() uint16
func (RemoveNonDirtyChunksCommand) GetTxId ¶
func (c RemoveNonDirtyChunksCommand) GetTxId() TxId
func (RemoveNonDirtyChunksCommand) IsSingleShot ¶
func (c RemoveNonDirtyChunksCommand) IsSingleShot() bool
func (RemoveNonDirtyChunksCommand) NeedTwoPhaseCommit ¶
func (c RemoveNonDirtyChunksCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type RemoveServerCommand ¶
type RemoveServerCommand struct {
// contains filtered or unexported fields
}
func NewRemoveServerCommand ¶
func NewRemoveServerCommand(serverId uint32) RemoveServerCommand
func (RemoveServerCommand) Apply ¶
func (c RemoveServerCommand) Apply(n *NodeServer, _ ExtLogCommandImpl)
func (RemoveServerCommand) GetCmdId ¶
func (c RemoveServerCommand) GetCmdId() uint16
func (RemoveServerCommand) GetExtPayloadSize ¶
func (c RemoveServerCommand) GetExtPayloadSize() uint8
func (RemoveServerCommand) SetExtPayload ¶
func (c RemoveServerCommand) SetExtPayload(extPayload []byte)
type RenameBlobInput ¶
type RenameBlobOutput ¶
type RenameBlobOutput struct {
RequestId string
}
type RenameCoordinatorCommand ¶
type RenameCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewRenameCoordinatorCommand ¶
func NewRenameCoordinatorCommand(txId TxId) RenameCoordinatorCommand
func (*RenameCoordinatorCommand) AddMeta ¶
func (r *RenameCoordinatorCommand) AddMeta(txRet TxRet, oldKey string, newKey string, selfGroup string)
func (*RenameCoordinatorCommand) AddParent ¶
func (r *RenameCoordinatorCommand) AddParent(txRet TxRet, selfGroup string)
func (RenameCoordinatorCommand) Commit ¶
func (c RenameCoordinatorCommand) Commit(n *NodeServer)
func (RenameCoordinatorCommand) GetExtCmdId ¶
func (c RenameCoordinatorCommand) GetExtCmdId() uint16
func (RenameCoordinatorCommand) GetTxId ¶
func (c RenameCoordinatorCommand) GetTxId() TxId
func (RenameCoordinatorCommand) IsSingleShot ¶
func (c RenameCoordinatorCommand) IsSingleShot() bool
func (RenameCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c RenameCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
func (RenameCoordinatorCommand) RemoteCommit ¶
func (c RenameCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
type RenameMetaInfo ¶
type RenameMetaInfo struct {
// contains filtered or unexported fields
}
func NewRenameMetaInfo ¶
func NewRenameMetaInfo(meta *WorkingMeta, oldKey string, newKey string) RenameMetaInfo
func NewRenameMetaInfoFromMsg ¶
func NewRenameMetaInfoFromMsg(msg *common.RenameMetaInfoMsg) RenameMetaInfo
type RenameMetaOp ¶
type RenameMetaOp struct {
// contains filtered or unexported fields
}
func NewRenameMetaOp ¶
func NewRenameMetaOp(txId TxId, inodeKey InodeKeyType, key string, srcName string, dstName string, childInodekey InodeKeyType) RenameMetaOp
func (RenameMetaOp) GetCaller ¶
func (o RenameMetaOp) GetCaller(n *NodeServer) RpcCaller
func (RenameMetaOp) GetLeader ¶
func (o RenameMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (RenameMetaOp) GetTxId ¶
func (o RenameMetaOp) GetTxId() TxId
func (RenameMetaOp) RetToMsg ¶
func (o RenameMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type ResetExtCommand ¶
type ResetExtCommand struct {
// contains filtered or unexported fields
}
func NewResetExtCommand ¶
func NewResetExtCommand(logId uint32, nextSeqNum uint32) ResetExtCommand
func (ResetExtCommand) Apply ¶
func (c ResetExtCommand) Apply(n *NodeServer, _ ExtLogCommandImpl)
func (ResetExtCommand) GetCmdId ¶
func (c ResetExtCommand) GetCmdId() uint16
func (ResetExtCommand) GetExtPayloadSize ¶
func (c ResetExtCommand) GetExtPayloadSize() uint8
func (ResetExtCommand) SetExtPayload ¶
func (c ResetExtCommand) SetExtPayload(extPayload []byte)
type RestoreDirtyChunkOp ¶
type RestoreDirtyChunkOp struct {
// contains filtered or unexported fields
}
func NewRestoreDirtyChunkOp ¶
func NewRestoreDirtyChunkOp(migrationId MigrationId, target RaftNode, inodeKey InodeKeyType, chunkSize int64, offset int64, objectSize int64, chunkVer uint32, bufs [][]byte) RestoreDirtyChunkOp
func (RestoreDirtyChunkOp) GetCaller ¶
func (o RestoreDirtyChunkOp) GetCaller(*NodeServer) RpcCaller
func (RestoreDirtyChunkOp) GetLeader ¶
func (o RestoreDirtyChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (RestoreDirtyChunkOp) RetToMsg ¶
func (o RestoreDirtyChunkOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type RestoreDirtyMetaOp ¶
type RestoreDirtyMetaOp struct {
// contains filtered or unexported fields
}
func NewRestoreDirtyMetaOp ¶
func NewRestoreDirtyMetaOp(s *Snapshot, target RaftNode) RestoreDirtyMetaOp
func (RestoreDirtyMetaOp) GetCaller ¶
func (o RestoreDirtyMetaOp) GetCaller(*NodeServer) RpcCaller
func (RestoreDirtyMetaOp) GetLeader ¶
func (o RestoreDirtyMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (RestoreDirtyMetaOp) RetToMsg ¶
func (o RestoreDirtyMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type RpcCaller ¶
type RpcCaller interface { GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply) TryNext(n *NodeServer, i int) bool // contains filtered or unexported methods }
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
func NewRpcClient ¶
func (*RpcClient) BroadcastAndWaitRpcMsg ¶
func (*RpcClient) CheckReset ¶
func (*RpcClient) Connect ¶
func (w *RpcClient) Connect(na common.NodeAddrInet4) (fd int, err error)
func (*RpcClient) SendAndWait ¶
func (w *RpcClient) SendAndWait(msg RpcMsg, sa common.NodeAddrInet4, extLogger *OnDiskLogger, timeout time.Duration) (replyMsg RpcMsg, err error)
func (*RpcClient) UnicastRpcMsg ¶
func (w *RpcClient) UnicastRpcMsg(msg RpcMsg, sa common.NodeAddrInet4, extLogger *OnDiskLogger, timeout time.Duration, dataBuf [][]byte, debug bool) (err error)
func (*RpcClient) WaitAndCheckRaftReply ¶
func (w *RpcClient) WaitAndCheckRaftReply(raft *RaftInstance, servers map[int]*WriteRpcState, timeout time.Duration, debug bool) (nrSuccess int)
type RpcClientConnectionV2 ¶
type RpcClientConnectionV2 struct {
// contains filtered or unexported fields
}
func NewRpcClientConnectionV2 ¶
func NewRpcClientConnectionV2(na common.NodeAddrInet4, connectErrLog bool, boundDev string) (ret *RpcClientConnectionV2, err error)
func NewRpcClientConnectionV2FromFd ¶
func NewRpcClientConnectionV2FromFd(fd int, na common.NodeAddrInet4) (ret *RpcClientConnectionV2, err error)
func (*RpcClientConnectionV2) AsyncObjcacheRpc ¶
func (w *RpcClientConnectionV2) AsyncObjcacheRpc(extCmdId uint16, seqNum uint64, args proto.Message, sa common.NodeAddrInet4, extLogger *OnDiskLogger, dataBuf [][]byte, rpcArgs *RpcSeqNumArgs) (reply int32)
func (*RpcClientConnectionV2) CallObjcacheRpc ¶
func (w *RpcClientConnectionV2) CallObjcacheRpc(extCmdId uint16, seqNum uint64, args proto.Message, timeout time.Duration, extLogger *OnDiskLogger, dataBuf [][]byte, rpcArgs *RpcSeqNumArgs, ret proto.Message) (reply int32)
func (*RpcClientConnectionV2) CallObjcacheRpcNoTimeout ¶
func (w *RpcClientConnectionV2) CallObjcacheRpcNoTimeout(extCmdId uint16, seqNum uint64, args proto.Message, extLogger *OnDiskLogger, dataBuf [][]byte, rpcArgs *RpcSeqNumArgs, ret proto.Message) (reply int32)
func (*RpcClientConnectionV2) Close ¶
func (w *RpcClientConnectionV2) Close() bool
func (*RpcClientConnectionV2) Down ¶
func (w *RpcClientConnectionV2) Down() int32
func (*RpcClientConnectionV2) IsFree ¶
func (w *RpcClientConnectionV2) IsFree() bool
func (*RpcClientConnectionV2) RemoveRpcArgs ¶
func (w *RpcClientConnectionV2) RemoveRpcArgs(seqNum uint64)
func (*RpcClientConnectionV2) SendRpcMsg ¶
func (w *RpcClientConnectionV2) SendRpcMsg(msg RpcMsg, extLogger *OnDiskLogger, wakeUpInterval time.Duration, dataBuf [][]byte, doTimeout bool) (err error)
func (*RpcClientConnectionV2) StoreRpcArgs ¶
func (w *RpcClientConnectionV2) StoreRpcArgs(seqNum uint64, args *RpcSeqNumArgs)
func (*RpcClientConnectionV2) Up ¶
func (w *RpcClientConnectionV2) Up()
func (*RpcClientConnectionV2) WaitAndGetRpcReply ¶
type RpcClientV2 ¶
type RpcClientV2 struct {
// contains filtered or unexported fields
}
func NewRpcClientV2 ¶
func NewRpcClientV2(boundDev string) (*RpcClientV2, error)
func (*RpcClientV2) AsyncObjcacheRpc ¶
func (w *RpcClientV2) AsyncObjcacheRpc(extCmdId uint16, args proto.Message, sa common.NodeAddrInet4, extLogger *OnDiskLogger, dataBuf [][]byte, rpcArgs *RpcSeqNumArgs) (con *RpcClientConnectionV2, seqNum uint64, reply int32)
func (*RpcClientV2) CallObjcacheRpc ¶
func (w *RpcClientV2) CallObjcacheRpc(extCmdId uint16, args proto.Message, sa common.NodeAddrInet4, timeout time.Duration, extLogger *OnDiskLogger, dataBuf [][]byte, rpcArgs *RpcSeqNumArgs, ret proto.Message) (reply int32)
func (*RpcClientV2) CheckReset ¶
func (w *RpcClientV2) CheckReset() (ok bool)
func (*RpcClientV2) Close ¶
func (w *RpcClientV2) Close()
func (*RpcClientV2) WaitAsyncObjcacheRpc ¶
func (w *RpcClientV2) WaitAsyncObjcacheRpc(con *RpcClientConnectionV2, seqNum uint64, ret proto.Message) (reply int32)
type RpcMgr ¶
type RpcMgr struct {
// contains filtered or unexported fields
}
func NewRpcManager ¶
func NewRpcManager(n *NodeServer) *RpcMgr
func (*RpcMgr) CallRpcOneShot ¶
func (o *RpcMgr) CallRpcOneShot(c RpcCaller, nodeList *RaftNodeList) (ret RpcRet, r RaftBasicReply)
func (*RpcMgr) CheckReset ¶
func (*RpcMgr) Commit ¶
func (o *RpcMgr) Commit(extLog CoordinatorCommand, retryInterval time.Duration) (reply int32)
func (*RpcMgr) CommitCoordinator ¶
func (o *RpcMgr) CommitCoordinator(extLog CoordinatorCommand, retryInterval time.Duration) (reply int32)
func (*RpcMgr) DeleteAndUnlockLocalAll ¶
func (*RpcMgr) RestoreDirtyChunksBottomHalf ¶
type RpcMsg ¶
type RpcMsg struct {
// contains filtered or unexported fields
}
func (*RpcMsg) CreateOptControlHeader ¶
func (*RpcMsg) FillAppendEntriesResponseArgs ¶
func (*RpcMsg) FillAppendEntryArgs ¶
func (*RpcMsg) FillExecProtoBufArgs ¶
func (*RpcMsg) FillRequestVoteArgs ¶
func (*RpcMsg) FillRequestVoteResponseArgs ¶
func (*RpcMsg) GetAppendEntriesResponseArgs ¶
func (*RpcMsg) GetAppendEntryArgs ¶
func (*RpcMsg) GetAppendEntryCommandDiskFormat ¶
func (d *RpcMsg) GetAppendEntryCommandDiskFormat(off uint16) (cmd AppendEntryCommand, nextOff uint16)
func (*RpcMsg) GetAppendEntryExtHeader ¶
func (*RpcMsg) GetAppendEntryNrEntries ¶
func (*RpcMsg) GetArrivingMsgLengths ¶
func (*RpcMsg) GetCmdPayload ¶
func (*RpcMsg) GetExecProtoBufRpcId ¶
func (*RpcMsg) GetExecProtoBufRpcSeqNum ¶
func (*RpcMsg) GetOptControlHeader ¶
func (*RpcMsg) GetOptHeaderLength ¶
func (*RpcMsg) GetOptHeaderPayload ¶
func (*RpcMsg) GetRequestVoteArgs ¶
func (*RpcMsg) GetRequestVoteResponseArgs ¶
func (*RpcMsg) ParseExecProtoBufMessage ¶
func (*RpcMsg) SetCmdControlHeader ¶
func (*RpcMsg) SetNrEntries ¶
func (*RpcMsg) SetOptHeaderLength ¶
func (*RpcMsg) SetTotalExtLogLength ¶
type RpcReplyClient ¶
type RpcReplyClient struct {
// contains filtered or unexported fields
}
func NewRpcReplyClient ¶
func NewRpcReplyClient() (*RpcReplyClient, error)
func (*RpcReplyClient) CheckReset ¶
func (w *RpcReplyClient) CheckReset() (ok bool)
func (*RpcReplyClient) Close ¶
func (w *RpcReplyClient) Close()
func (*RpcReplyClient) Register ¶
func (w *RpcReplyClient) Register(fd int, sa common.NodeAddrInet4) (err error)
func (*RpcReplyClient) ReplyRpcMsg ¶
func (w *RpcReplyClient) ReplyRpcMsg(msg RpcMsg, fd int, sa common.NodeAddrInet4, extLogger *OnDiskLogger, timeout time.Duration, dataBuf [][]byte) (reply int32)
type RpcSeqNumArgs ¶
type RpcSeqNumArgs struct {
// contains filtered or unexported fields
}
type RpcStatePointer ¶
type RpcStatePointer struct {
// contains filtered or unexported fields
}
type RpcThreads ¶
type RpcThreads struct {
// contains filtered or unexported fields
}
func NewRpcThreads ¶
func NewRpcThreads(sa common.NodeAddrInet4, boundDev string) (ret RpcThreads, err error)
func (*RpcThreads) AcceptThread ¶
func (f *RpcThreads) AcceptThread(epollFd int, acceptTimeout time.Duration, stopFlag *int32)
func (*RpcThreads) CheckReset ¶
func (f *RpcThreads) CheckReset() (ok bool)
func (*RpcThreads) Close ¶
func (f *RpcThreads) Close()
func (*RpcThreads) Start ¶
func (f *RpcThreads) Start(maxEvents int, n *NodeServer, raft *RaftInstance) error
type S3Backend ¶
func (*S3Backend) Capabilities ¶
func (s *S3Backend) Capabilities() *Capabilities
func (*S3Backend) CopyBlob ¶
func (s *S3Backend) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (*S3Backend) DeleteBlob ¶
func (s *S3Backend) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (*S3Backend) DeleteBlobs ¶
func (s *S3Backend) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*S3Backend) GetBlob ¶
func (s *S3Backend) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (*S3Backend) HeadBlob ¶
func (s *S3Backend) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (*S3Backend) ListBlobs ¶
func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*S3Backend) ListObjectsV2 ¶
func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, string, error)
func (*S3Backend) MakeBucket ¶
func (s *S3Backend) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (*S3Backend) MultipartBlobAbort ¶
func (s *S3Backend) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (*S3Backend) MultipartBlobAdd ¶
func (s *S3Backend) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*S3Backend) MultipartBlobBegin ¶
func (s *S3Backend) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (*S3Backend) MultipartBlobCommit ¶
func (s *S3Backend) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (*S3Backend) MultipartExpire ¶
func (s *S3Backend) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (*S3Backend) PutBlob ¶
func (s *S3Backend) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (*S3Backend) RemoveBucket ¶
func (s *S3Backend) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (*S3Backend) RenameBlob ¶
func (s *S3Backend) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type S3Config ¶
type S3Config struct { Profile string AccessKey string SecretKey string RoleArn string RoleExternalId string RoleSessionName string StsEndpoint string RequesterPays bool Region string RegionSet bool StorageClass string UseSSE bool UseKMS bool KMSKeyID string SseC string SseCDigest string ACL string Subdomain bool Credentials *credentials.Credentials Session *session.Session BucketOwner string }
type SingleShotOp ¶
type SingleShotOp interface { GetLeader(*NodeServer, *RaftNodeList) (RaftNode, bool) RetToMsg(interface{}, RaftBasicReply) (proto.Message, []SlicedPageBuffer) GetCaller(*NodeServer) RpcCaller // contains filtered or unexported methods }
func NewGetApiIpAndPortOpFromMsg ¶
func NewGetApiIpAndPortOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
func NewGetMetaOpFromMsg ¶
func NewGetMetaOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
func NewPrefetchChunkOpFromMsg ¶
func NewPrefetchChunkOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
func NewReadChunkOpFromMsg ¶
func NewReadChunkOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
func NewRestoreDirtyMetaOpFromMsg ¶
func NewRestoreDirtyMetaOpFromMsg(msg RpcMsg) (fn SingleShotOp, nodeListVer uint64, reply int32)
func NewUpdateMetaAttrOpFromMsg ¶
func NewUpdateMetaAttrOpFromMsg(msg RpcMsg) (SingleShotOp, uint64, int32)
type SingleShotRpcCaller ¶
type SingleShotRpcCaller struct {
// contains filtered or unexported fields
}
func NewSingleShotRpcCaller ¶
func NewSingleShotRpcCaller(fn SingleShotOp, remoteTimeout time.Duration, noTryBeginOp bool) SingleShotRpcCaller
func (SingleShotRpcCaller) ExecLocal ¶
func (c SingleShotRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (SingleShotRpcCaller) ExecLocalInRpc ¶
func (c SingleShotRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (SingleShotRpcCaller) ExecRemote ¶
func (c SingleShotRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (SingleShotRpcCaller) GetLeader ¶
func (c SingleShotRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
func (SingleShotRpcCaller) TryNext ¶
func (c SingleShotRpcCaller) TryNext(n *NodeServer, i int) bool
type SlicedPageBuffer ¶
type SlicedPageBuffer struct { Buf []byte // contains filtered or unexported fields }
func NewBlankSlicedPageBuffer ¶
func NewBlankSlicedPageBuffer(size int64) SlicedPageBuffer
func (*SlicedPageBuffer) SetEvictable ¶
func (p *SlicedPageBuffer) SetEvictable()
func (*SlicedPageBuffer) Slice ¶
func (p *SlicedPageBuffer) Slice(begin int64, last int64)
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func NewSnapshot ¶
func NewSnapshot(maxBytes int, migrationId MigrationId, newExtLogId uint32, metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg, dirents []*common.InodeTreeMsg, dirtyMetas []*common.DirtyMetaInfoMsg, dirtyChunks []*common.AppendCommitUpdateChunksMsg, nodeList *common.RaftNodeListMsg) *Snapshot
func NewSnapshotFromMsg ¶
func NewSnapshotFromMsg(msg *common.SnapshotMsg) *Snapshot
type StagingChunk ¶
type StagingChunk struct {
// contains filtered or unexported fields
}
func NewStagingChunk ¶
func NewStagingChunkFromAddMsg ¶
func NewStagingChunkFromAddMsg(msg *common.StagingChunkAddMsg) *StagingChunk
func (*StagingChunk) AppendToLog ¶
func (s *StagingChunk) AppendToLog(inodeMgr *InodeMgr, reader *BufferedDiskPageReader, fetchKey string) (err error)
func (*StagingChunk) GetObject ¶
func (s *StagingChunk) GetObject(inodeMgr *InodeMgr, reader *BufferedDiskPageReader, fetchOffset int64) error
func (*StagingChunk) ReadObject ¶
func (s *StagingChunk) ReadObject(inodeMgr *InodeMgr, reader *BufferedDiskPageReader) (err error)
type StagingChunkPart ¶
type StagingChunkPart struct {
// contains filtered or unexported fields
}
func (*StagingChunkPart) LastOffset ¶
func (p *StagingChunkPart) LastOffset() int64
type StaleInode ¶
type StaleInode struct {
// contains filtered or unexported fields
}
type StorageBackend ¶
type StorageBackend interface { Init(key string) error Capabilities() *Capabilities // typically this would return bucket/prefix Bucket() string HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error) GetBlob(param *GetBlobInput) (*GetBlobOutput, error) PutBlob(param *PutBlobInput) (*PutBlobOutput, error) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error) Delegate() interface{} }
/ Implementations of all the functions here are expected to be / concurrency-safe, except for / / Init() is called exactly once before any other functions are / called. / / Capabilities()/Bucket() are expected to be const
type StorageBackendInitError ¶
type StorageBackendInitError struct {
// contains filtered or unexported fields
}
func (StorageBackendInitError) Bucket ¶
func (s StorageBackendInitError) Bucket() string
func (StorageBackendInitError) Capabilities ¶
func (e StorageBackendInitError) Capabilities() *Capabilities
func (StorageBackendInitError) CopyBlob ¶
func (e StorageBackendInitError) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (StorageBackendInitError) Delegate ¶
func (e StorageBackendInitError) Delegate() interface{}
func (StorageBackendInitError) DeleteBlob ¶
func (e StorageBackendInitError) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (StorageBackendInitError) DeleteBlobs ¶
func (e StorageBackendInitError) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (StorageBackendInitError) GetBlob ¶
func (e StorageBackendInitError) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (StorageBackendInitError) HeadBlob ¶
func (e StorageBackendInitError) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (StorageBackendInitError) Init ¶
func (e StorageBackendInitError) Init(key string) error
func (StorageBackendInitError) ListBlobs ¶
func (e StorageBackendInitError) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (StorageBackendInitError) MakeBucket ¶
func (e StorageBackendInitError) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (StorageBackendInitError) MultipartBlobAbort ¶
func (e StorageBackendInitError) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (StorageBackendInitError) MultipartBlobAdd ¶
func (e StorageBackendInitError) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (StorageBackendInitError) MultipartBlobBegin ¶
func (e StorageBackendInitError) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (StorageBackendInitError) MultipartBlobCommit ¶
func (e StorageBackendInitError) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (StorageBackendInitError) MultipartExpire ¶
func (e StorageBackendInitError) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (StorageBackendInitError) PutBlob ¶
func (e StorageBackendInitError) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (StorageBackendInitError) RemoveBucket ¶
func (e StorageBackendInitError) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (StorageBackendInitError) RenameBlob ¶
func (e StorageBackendInitError) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type StorageBackendInitWrapper ¶
type StorageBackendInitWrapper struct { StorageBackend // contains filtered or unexported fields }
func (*StorageBackendInitWrapper) Bucket ¶
func (s *StorageBackendInitWrapper) Bucket() string
func (*StorageBackendInitWrapper) Capabilities ¶
func (s *StorageBackendInitWrapper) Capabilities() *Capabilities
func (*StorageBackendInitWrapper) CopyBlob ¶
func (s *StorageBackendInitWrapper) CopyBlob(param *CopyBlobInput) (*CopyBlobOutput, error)
func (*StorageBackendInitWrapper) DeleteBlob ¶
func (s *StorageBackendInitWrapper) DeleteBlob(param *DeleteBlobInput) (*DeleteBlobOutput, error)
func (*StorageBackendInitWrapper) DeleteBlobs ¶
func (s *StorageBackendInitWrapper) DeleteBlobs(param *DeleteBlobsInput) (*DeleteBlobsOutput, error)
func (*StorageBackendInitWrapper) GetBlob ¶
func (s *StorageBackendInitWrapper) GetBlob(param *GetBlobInput) (*GetBlobOutput, error)
func (*StorageBackendInitWrapper) HeadBlob ¶
func (s *StorageBackendInitWrapper) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error)
func (*StorageBackendInitWrapper) Init ¶
func (s *StorageBackendInitWrapper) Init(key string) error
func (*StorageBackendInitWrapper) ListBlobs ¶
func (s *StorageBackendInitWrapper) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error)
func (*StorageBackendInitWrapper) MakeBucket ¶
func (s *StorageBackendInitWrapper) MakeBucket(param *MakeBucketInput) (*MakeBucketOutput, error)
func (*StorageBackendInitWrapper) MultipartBlobAbort ¶
func (s *StorageBackendInitWrapper) MultipartBlobAbort(param *MultipartBlobCommitInput) (*MultipartBlobAbortOutput, error)
func (*StorageBackendInitWrapper) MultipartBlobAdd ¶
func (s *StorageBackendInitWrapper) MultipartBlobAdd(param *MultipartBlobAddInput) (*MultipartBlobAddOutput, error)
func (*StorageBackendInitWrapper) MultipartBlobBegin ¶
func (s *StorageBackendInitWrapper) MultipartBlobBegin(param *MultipartBlobBeginInput) (*MultipartBlobCommitInput, error)
func (*StorageBackendInitWrapper) MultipartBlobCommit ¶
func (s *StorageBackendInitWrapper) MultipartBlobCommit(param *MultipartBlobCommitInput) (*MultipartBlobCommitOutput, error)
func (*StorageBackendInitWrapper) MultipartExpire ¶
func (s *StorageBackendInitWrapper) MultipartExpire(param *MultipartExpireInput) (*MultipartExpireOutput, error)
func (*StorageBackendInitWrapper) PutBlob ¶
func (s *StorageBackendInitWrapper) PutBlob(param *PutBlobInput) (*PutBlobOutput, error)
func (*StorageBackendInitWrapper) RemoveBucket ¶
func (s *StorageBackendInitWrapper) RemoveBucket(param *RemoveBucketInput) (*RemoveBucketOutput, error)
func (*StorageBackendInitWrapper) RenameBlob ¶
func (s *StorageBackendInitWrapper) RenameBlob(param *RenameBlobInput) (*RenameBlobOutput, error)
type TruncateCoordinatorCommand ¶
type TruncateCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewTruncateCoordinatorCommand ¶
func NewTruncateCoordinatorCommand(txId TxId, metaTx TxRet, raftGroup *RaftGroupMgr, commitTxId TxId) TruncateCoordinatorCommand
func (TruncateCoordinatorCommand) Commit ¶
func (c TruncateCoordinatorCommand) Commit(n *NodeServer)
func (TruncateCoordinatorCommand) GetExtCmdId ¶
func (c TruncateCoordinatorCommand) GetExtCmdId() uint16
func (TruncateCoordinatorCommand) GetTxId ¶
func (c TruncateCoordinatorCommand) GetTxId() TxId
func (TruncateCoordinatorCommand) IsSingleShot ¶
func (c TruncateCoordinatorCommand) IsSingleShot() bool
func (TruncateCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c TruncateCoordinatorCommand) NeedTwoPhaseCommit(raftGroup *RaftGroupMgr) bool
func (TruncateCoordinatorCommand) RemoteCommit ¶
func (c TruncateCoordinatorCommand) RemoteCommit(raftGroup *RaftGroupMgr) []ParticipantOp
type TruncateMetaOp ¶
type TruncateMetaOp struct {
// contains filtered or unexported fields
}
func NewTruncateMetaOp ¶
func NewTruncateMetaOp(txId TxId, inodeKey InodeKeyType, newSize int64) TruncateMetaOp
func (TruncateMetaOp) GetCaller ¶
func (o TruncateMetaOp) GetCaller(n *NodeServer) RpcCaller
func (TruncateMetaOp) GetLeader ¶
func (o TruncateMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (TruncateMetaOp) GetTxId ¶
func (o TruncateMetaOp) GetTxId() TxId
func (TruncateMetaOp) RetToMsg ¶
func (o TruncateMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type TxIdMgr ¶
type TxIdMgr struct {
// contains filtered or unexported fields
}
func NewTxIdMgr ¶
func (*TxIdMgr) GetCoordinatorTxId ¶
func (*TxIdMgr) GetLocalTxIds ¶
func (*TxIdMgr) GetMigrationId ¶
func (t *TxIdMgr) GetMigrationId() MigrationId
func (*TxIdMgr) GetTxGroupIds ¶
type TxMgr ¶
type TxMgr struct {
// contains filtered or unexported fields
}
func (*TxMgr) ResumeTx ¶
func (m *TxMgr) ResumeTx(n *NodeServer) int32
type UnlinkMetaOp ¶
type UnlinkMetaOp struct {
// contains filtered or unexported fields
}
func NewUnlinkMetaOp ¶
func NewUnlinkMetaOp(txId TxId, inodeKey InodeKeyType, parentKey string, childName string, childIsDir bool) UnlinkMetaOp
func (UnlinkMetaOp) GetCaller ¶
func (o UnlinkMetaOp) GetCaller(n *NodeServer) RpcCaller
func (UnlinkMetaOp) GetLeader ¶
func (o UnlinkMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (UnlinkMetaOp) GetTxId ¶
func (o UnlinkMetaOp) GetTxId() TxId
func (UnlinkMetaOp) RetToMsg ¶
func (o UnlinkMetaOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type UpadteChunkRpcCaller ¶
type UpadteChunkRpcCaller struct {
// contains filtered or unexported fields
}
func NewUpadteChunkRpcCaller ¶
func NewUpadteChunkRpcCaller(fn ParticipantOp, remoteTimeout time.Duration) UpadteChunkRpcCaller
func (UpadteChunkRpcCaller) ExecLocal ¶
func (c UpadteChunkRpcCaller) ExecLocal(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (UpadteChunkRpcCaller) ExecLocalInRpc ¶
func (c UpadteChunkRpcCaller) ExecLocalInRpc(n *NodeServer, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (UpadteChunkRpcCaller) ExecRemote ¶
func (c UpadteChunkRpcCaller) ExecRemote(n *NodeServer, addr common.NodeAddrInet4, nodeListVer uint64) (ret RpcRet, r RaftBasicReply)
func (UpadteChunkRpcCaller) GetLeader ¶
func (c UpadteChunkRpcCaller) GetLeader(n *NodeServer, nodeList *RaftNodeList) (RaftNode, bool)
func (UpadteChunkRpcCaller) TryNext ¶
func (c UpadteChunkRpcCaller) TryNext(n *NodeServer, i int) bool
type UpdateChunkCommand ¶
type UpdateChunkCommand struct { }
func NewUpdateChunkCommand ¶
func NewUpdateChunkCommand() UpdateChunkCommand
func (UpdateChunkCommand) Commit ¶
func (c UpdateChunkCommand) Commit(n *NodeServer)
func (UpdateChunkCommand) GetExtCmdId ¶
func (c UpdateChunkCommand) GetExtCmdId() uint16
func (UpdateChunkCommand) GetTxId ¶
func (c UpdateChunkCommand) GetTxId() TxId
func (UpdateChunkCommand) IsSingleShot ¶
func (c UpdateChunkCommand) IsSingleShot() bool
func (UpdateChunkCommand) NeedTwoPhaseCommit ¶
func (c UpdateChunkCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type UpdateChunkOp ¶
type UpdateChunkOp struct {
// contains filtered or unexported fields
}
func NewUpdateChunkOp ¶
func NewUpdateChunkOp(txId TxId, inodeKey InodeKeyType, chunkSize int64, offset int64, buf []byte) UpdateChunkOp
func (UpdateChunkOp) GetCaller ¶
func (o UpdateChunkOp) GetCaller(n *NodeServer) RpcCaller
func (UpdateChunkOp) GetLeader ¶
func (o UpdateChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (UpdateChunkOp) GetTxId ¶
func (o UpdateChunkOp) GetTxId() TxId
func (UpdateChunkOp) RetToMsg ¶
func (o UpdateChunkOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type UpdateMetaAttrCommand ¶
type UpdateMetaAttrCommand struct {
// contains filtered or unexported fields
}
func NewUpdateMetaAttrCommand ¶
func NewUpdateMetaAttrCommand(inodeKey InodeKeyType, mode uint32, ts int64) UpdateMetaAttrCommand
func (UpdateMetaAttrCommand) Commit ¶
func (c UpdateMetaAttrCommand) Commit(n *NodeServer)
func (UpdateMetaAttrCommand) GetExtCmdId ¶
func (c UpdateMetaAttrCommand) GetExtCmdId() uint16
func (UpdateMetaAttrCommand) GetTxId ¶
func (c UpdateMetaAttrCommand) GetTxId() TxId
func (UpdateMetaAttrCommand) IsSingleShot ¶
func (c UpdateMetaAttrCommand) IsSingleShot() bool
func (UpdateMetaAttrCommand) NeedTwoPhaseCommit ¶
func (c UpdateMetaAttrCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type UpdateMetaAttrOp ¶
type UpdateMetaAttrOp struct {
// contains filtered or unexported fields
}
func NewUpdateMetaAttrOp ¶
func NewUpdateMetaAttrOp(txId TxId, inodeKey InodeKeyType, mode uint32, ts int64) UpdateMetaAttrOp
func (UpdateMetaAttrOp) GetCaller ¶
func (o UpdateMetaAttrOp) GetCaller(n *NodeServer) RpcCaller
func (UpdateMetaAttrOp) GetLeader ¶
func (o UpdateMetaAttrOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (UpdateMetaAttrOp) GetTxId ¶
func (o UpdateMetaAttrOp) GetTxId() TxId
func (UpdateMetaAttrOp) RetToMsg ¶
func (o UpdateMetaAttrOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type UpdateMetaCommand ¶
type UpdateMetaCommand struct {
// contains filtered or unexported fields
}
func NewUpdateMetaCommand ¶
func NewUpdateMetaCommand(txId TxId, working *WorkingMeta) UpdateMetaCommand
func (UpdateMetaCommand) Commit ¶
func (c UpdateMetaCommand) Commit(n *NodeServer)
func (UpdateMetaCommand) GetExtCmdId ¶
func (c UpdateMetaCommand) GetExtCmdId() uint16
func (UpdateMetaCommand) GetTxId ¶
func (c UpdateMetaCommand) GetTxId() TxId
func (UpdateMetaCommand) IsSingleShot ¶
func (c UpdateMetaCommand) IsSingleShot() bool
func (UpdateMetaCommand) NeedTwoPhaseCommit ¶
func (c UpdateMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type UpdateMetaKeyCommand ¶
type UpdateMetaKeyCommand struct {
// contains filtered or unexported fields
}
func NewUpdateMetaKeyCommand ¶
func NewUpdateMetaKeyCommand(txId TxId, parentWorking *WorkingMeta, children map[string]InodeKeyType, oldKey string, newKey string) UpdateMetaKeyCommand
func (UpdateMetaKeyCommand) Commit ¶
func (c UpdateMetaKeyCommand) Commit(n *NodeServer)
func (UpdateMetaKeyCommand) GetExtCmdId ¶
func (c UpdateMetaKeyCommand) GetExtCmdId() uint16
func (UpdateMetaKeyCommand) GetTxId ¶
func (c UpdateMetaKeyCommand) GetTxId() TxId
func (UpdateMetaKeyCommand) IsSingleShot ¶
func (c UpdateMetaKeyCommand) IsSingleShot() bool
func (UpdateMetaKeyCommand) NeedTwoPhaseCommit ¶
func (c UpdateMetaKeyCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type UpdateMetaKeyOp ¶
type UpdateMetaKeyOp struct {
// contains filtered or unexported fields
}
func NewUpdateMetaKeyOp ¶
func NewUpdateMetaKeyOp(txId TxId, inodeKey InodeKeyType, oldKey string, newKey string, parent InodeKeyType) UpdateMetaKeyOp
func (UpdateMetaKeyOp) GetCaller ¶
func (o UpdateMetaKeyOp) GetCaller(n *NodeServer) RpcCaller
func (UpdateMetaKeyOp) GetLeader ¶
func (o UpdateMetaKeyOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (UpdateMetaKeyOp) GetTxId ¶
func (o UpdateMetaKeyOp) GetTxId() TxId
func (UpdateMetaKeyOp) RetToMsg ¶
func (o UpdateMetaKeyOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type UpdateMetaSizeOp ¶
type UpdateMetaSizeOp struct {
// contains filtered or unexported fields
}
func NewUpdateMetaSizeOp ¶
func NewUpdateMetaSizeOp(txId TxId, inodeKey InodeKeyType, newSize int64, mTime int64, mode uint32) UpdateMetaSizeOp
func (UpdateMetaSizeOp) GetCaller ¶
func (o UpdateMetaSizeOp) GetCaller(n *NodeServer) RpcCaller
func (UpdateMetaSizeOp) GetLeader ¶
func (o UpdateMetaSizeOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (UpdateMetaSizeOp) GetTxId ¶
func (o UpdateMetaSizeOp) GetTxId() TxId
func (UpdateMetaSizeOp) RetToMsg ¶
func (o UpdateMetaSizeOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type UpdateNodeListCommand ¶
type UpdateNodeListCommand struct {
// contains filtered or unexported fields
}
func NewUpdateNodeListCommand ¶
func NewUpdateNodeListCommand(txId TxId, migrationId MigrationId, isAdd bool, needRestore bool, nodes []RaftNode, nodeListVer uint64) UpdateNodeListCommand
func (UpdateNodeListCommand) Commit ¶
func (c UpdateNodeListCommand) Commit(n *NodeServer)
func (UpdateNodeListCommand) GetExtCmdId ¶
func (c UpdateNodeListCommand) GetExtCmdId() uint16
func (UpdateNodeListCommand) GetTxId ¶
func (c UpdateNodeListCommand) GetTxId() TxId
func (UpdateNodeListCommand) IsSingleShot ¶
func (c UpdateNodeListCommand) IsSingleShot() bool
func (UpdateNodeListCommand) NeedTwoPhaseCommit ¶
func (c UpdateNodeListCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type UpdateNodeListCoordinatorCommand ¶
type UpdateNodeListCoordinatorCommand struct {
// contains filtered or unexported fields
}
func NewUpdateNodeListCoordinatorCommand ¶
func NewUpdateNodeListCoordinatorCommand(txId TxId, migrationId MigrationId, target RaftNode, isAdd bool, selfNode RaftNode) UpdateNodeListCoordinatorCommand
func (*UpdateNodeListCoordinatorCommand) AddNode ¶
func (c *UpdateNodeListCoordinatorCommand) AddNode(txRet TxRet)
func (UpdateNodeListCoordinatorCommand) Commit ¶
func (c UpdateNodeListCoordinatorCommand) Commit(n *NodeServer)
func (UpdateNodeListCoordinatorCommand) GetExtCmdId ¶
func (c UpdateNodeListCoordinatorCommand) GetExtCmdId() uint16
func (UpdateNodeListCoordinatorCommand) GetTxId ¶
func (c UpdateNodeListCoordinatorCommand) GetTxId() TxId
func (UpdateNodeListCoordinatorCommand) IsSingleShot ¶
func (c UpdateNodeListCoordinatorCommand) IsSingleShot() bool
func (UpdateNodeListCoordinatorCommand) NeedTwoPhaseCommit ¶
func (c UpdateNodeListCoordinatorCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
func (UpdateNodeListCoordinatorCommand) RemoteCommit ¶
func (c UpdateNodeListCoordinatorCommand) RemoteCommit(_ *RaftGroupMgr) []ParticipantOp
type UpdateNodeListOp ¶
type UpdateNodeListOp struct {
// contains filtered or unexported fields
}
func NewUpdateNodeListOp ¶
func NewUpdateNodeListOp(txId TxId, added RaftNode, leaderGroupId string, isAdd bool, target *common.NodeAddrInet4, migrationId MigrationId) UpdateNodeListOp
func (UpdateNodeListOp) GetCaller ¶
func (o UpdateNodeListOp) GetCaller(n *NodeServer) RpcCaller
func (UpdateNodeListOp) GetLeader ¶
func (o UpdateNodeListOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
func (UpdateNodeListOp) GetTxId ¶
func (o UpdateNodeListOp) GetTxId() TxId
func (UpdateNodeListOp) RetToMsg ¶
func (o UpdateNodeListOp) RetToMsg(ret interface{}, r RaftBasicReply) (proto.Message, []SlicedPageBuffer)
type UpdateParentInfo ¶
type UpdateParentInfo struct {
// contains filtered or unexported fields
}
func NewUpdateParentInfo ¶
func NewUpdateParentInfo(inodeKey InodeKeyType, key string, addInodeKey InodeKeyType, addChild string, removedChild string, childIsDir bool) *UpdateParentInfo
func NewUpdateParentInfoFromMsg ¶
func NewUpdateParentInfoFromMsg(msg *common.UpdateParentMetaInfoMsg) *UpdateParentInfo
type UpdateParentMetaCommand ¶
type UpdateParentMetaCommand struct {
// contains filtered or unexported fields
}
func NewUpdateParentMetaCommand ¶
func NewUpdateParentMetaCommand(txId TxId, info *UpdateParentInfo) UpdateParentMetaCommand
func (UpdateParentMetaCommand) Commit ¶
func (c UpdateParentMetaCommand) Commit(n *NodeServer)
func (UpdateParentMetaCommand) GetExtCmdId ¶
func (c UpdateParentMetaCommand) GetExtCmdId() uint16
func (UpdateParentMetaCommand) GetTxId ¶
func (c UpdateParentMetaCommand) GetTxId() TxId
func (UpdateParentMetaCommand) IsSingleShot ¶
func (c UpdateParentMetaCommand) IsSingleShot() bool
func (UpdateParentMetaCommand) NeedTwoPhaseCommit ¶
func (c UpdateParentMetaCommand) NeedTwoPhaseCommit(*RaftGroupMgr) bool
type UpdateParentRet ¶
type UpdateParentRet struct {
// contains filtered or unexported fields
}
type WorkingChunk ¶
type WorkingChunk struct {
// contains filtered or unexported fields
}
func (*WorkingChunk) AddNewStag ¶
func (c *WorkingChunk) AddNewStag(raft *RaftInstance, backingKey string, offset int64, updateType byte, objectSize int64, chunkSize int64) int32
func (*WorkingChunk) AddNewStagFromMsg ¶
func (c *WorkingChunk) AddNewStagFromMsg(l *common.StagingChunkAddMsg)
func (*WorkingChunk) AddStag ¶
func (c *WorkingChunk) AddStag(stag *StagingChunk)
AddStag must be in a critical section
func (*WorkingChunk) AddStagingChunkFromAddMsg ¶
func (c *WorkingChunk) AddStagingChunkFromAddMsg(cLog *common.WorkingChunkAddMsg)
func (*WorkingChunk) Copy ¶
func (c *WorkingChunk) Copy(chunkVer uint32) *WorkingChunk
func (*WorkingChunk) DeleteFromVersionListNoLock ¶
func (c *WorkingChunk) DeleteFromVersionListNoLock()
func (*WorkingChunk) GetNext ¶
func (c *WorkingChunk) GetNext(inodeMgr *InodeMgr, offset int64, blocking bool) (buf SlicedPageBuffer, err error)
func (*WorkingChunk) GetReader ¶
func (c *WorkingChunk) GetReader(chunkSize int64, objectSize int64, offset int64, inodeMgr *InodeMgr, blocking bool) *ChunkReader
func (*WorkingChunk) Head ¶
func (c *WorkingChunk) Head() *StagingChunkPart
func (*WorkingChunk) LastNonDeletedPtr ¶
func (c *WorkingChunk) LastNonDeletedPtr() *StagingChunkPart
func (*WorkingChunk) NewStagingChunkPart ¶
func (c *WorkingChunk) NewStagingChunkPart(length int64, stag *StagingChunk, slop int64) *StagingChunkPart
func (*WorkingChunk) Prefetch ¶
func (c *WorkingChunk) Prefetch(inodeMgr *InodeMgr)
func (*WorkingChunk) Tail ¶
func (c *WorkingChunk) Tail() *StagingChunkPart
func (*WorkingChunk) WriteToNext ¶
type WorkingMeta ¶
type WorkingMeta struct {
// contains filtered or unexported fields
}
func NewWorkingMeta ¶
func NewWorkingMeta(inodeKey InodeKeyType, chunkSize int64, expireMs int32, mode uint32, nlink uint32, fetchKey string) *WorkingMeta
func NewWorkingMetaFromMsg ¶
func NewWorkingMetaFromMsg(res *common.CopiedMetaMsg) *WorkingMeta
func (*WorkingMeta) GetAttr ¶
func (m *WorkingMeta) GetAttr(uid uint32, gid uint32) fuseops.InodeAttributes
func (*WorkingMeta) GetMetadata ¶
func (m *WorkingMeta) GetMetadata() map[string][]byte
func (*WorkingMeta) IsDeleted ¶
func (m *WorkingMeta) IsDeleted() bool
func (*WorkingMeta) IsDir ¶
func (m *WorkingMeta) IsDir() bool
type WriteRpcState ¶
type WriteRpcState struct {
// contains filtered or unexported fields
}