Documentation ¶
Overview ¶
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
* Copyright 2023- IBM Inc. All rights reserved * SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- func AwsErrToReply(err error) int32
- func CalcRequiredPageBufferSize(offset int64, dataLen int64) int64
- func CalculateBufferLengthForDownload(h MetaRWHandler, offset int64) int
- func CallGetApiPort(n *NodeServer, sa common.NodeAddrInet4) (apiPort int, reply int32)
- func CollectLRUChunks(dirtyMgr *DirtyMgr, raft *RaftInstance, reclaimDiskBytes int64) *common.DropLRUChunksArgs
- 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 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 IsReset(value uint32) bool
- 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 NewRenameRetFromMsg(msg *common.RenameRetMsg) (*RenameRet, RaftBasicReply)
- func NewSaFromApiNodeMsg(msg *api.ApiNodeMsg) (ret common.NodeAddrInet4)
- func NewSaFromNodeMsg(msg *common.NodeMsg) (ret common.NodeAddrInet4)
- 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, files *RaftFiles, pipeFds [2]int)
- 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 AppendEntryCommand
- func NewAppendEntryAddServerCommand(term uint32, serverId uint32, ip [4]byte, port uint16) (cmd AppendEntryCommand)
- func NewAppendEntryCommitTxCommand(term uint32, txId *common.TxIdMsg) (cmd AppendEntryCommand)
- func NewAppendEntryDeleteExtLogCommand(term uint32, fileId uint64) (cmd AppendEntryCommand)
- func NewAppendEntryFileCommand(term uint32, extCmdId uint16, fileId FileIdType, fileOffset int64, ...) (cmd AppendEntryCommand)
- func NewAppendEntryFileCommandFromFile(term uint32, extCmdId uint16, fileId FileIdType, fileOffset int64, ...) (cmd AppendEntryCommand, err error)
- func NewAppendEntryNoOpCommandDiskFormat(term uint32) (cmd AppendEntryCommand)
- func NewAppendEntryRemoveServerCommand(term uint32, serverId uint32) (cmd AppendEntryCommand)
- func NewAppendEntryResetExtLogCommand(term uint32, fileId uint64, nextSeqNum uint32) (cmd AppendEntryCommand)
- func (l *AppendEntryCommand) AppendToRpcMsg(d *RpcMsg) (newOptHeaderLength uint16, newTotalFileLength uint32)
- func (l *AppendEntryCommand) GetAsAddServer() (serverId uint32, ip [4]byte, port uint16)
- func (l *AppendEntryCommand) GetAsAppendEntryFile() (fileId FileIdType, fileLength int32, fileOffset int64)
- func (l *AppendEntryCommand) GetAsCommitTx() (clientId uint32, seqNum uint32, txSeqNum uint64)
- func (l *AppendEntryCommand) GetAsRemoveServer() (serverId uint32)
- func (l *AppendEntryCommand) GetAsResetExtLog() (fileId uint64, nextSeqNum uint32)
- 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 BlobItemOutput
- type BlobPrefixOutput
- type BucketCredential
- type BucketCredentials
- type BucketSpec
- type BufferedFilePageReader
- type CachedCommand
- type CachedFd
- 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) GetFileId() FileIdType
- 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) DontNeed(raft *RaftInstance)
- func (r *ChunkReader) GetBufferDirect(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 CommandCache
- type CommitDeleteChunkOp
- type CommitExpandChunkOp
- type CommitMigrationParticipantOp
- type CommitParticipantOp
- type CommitPersistChunkOp
- type CommitUpdateChunkOp
- type CoordinatorCreateObjectOp
- type CoordinatorDeleteObjectOp
- type CoordinatorDeletePersistOp
- type CoordinatorFlushObjectOp
- type CoordinatorHardLinkOp
- type CoordinatorId
- type CoordinatorOpBase
- type CoordinatorPersistOp
- type CoordinatorRenameObjectOp
- type CoordinatorRet
- type CoordinatorTruncateObjectOp
- type CoordinatorUpdateNodeListOp
- type CopyBlobInput
- type CopyBlobOutput
- type CreateChildMetaOp
- type CreateMetaOp
- type DataCache
- type DataCacheKey
- type Delegator
- type DeleteBlobInput
- type DeleteBlobOutput
- type DeleteBlobsInput
- type DeleteBlobsOutput
- type DeleteMetaOp
- type DeletedFileInfo
- type DirtyChunkInfo
- type DirtyMetaInfo
- type DirtyMgr
- 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) AppendCommitMigrationLog(raft *RaftInstance, txId TxId, migrationId MigrationId) int32
- func (d *DirtyMgr) AppendForgetAllDirtyLog(raft *RaftInstance) int32
- func (d *DirtyMgr) AppendRemoveNonDirtyChunksLog(raft *RaftInstance, fps []uint64) int32
- func (d *DirtyMgr) ApplyAsForgetAllDirty(extBuf []byte) int32
- func (d *DirtyMgr) ApplyAsRemoveNonDirtyChunks(extBuf []byte) int32
- func (d *DirtyMgr) CheckReset() (ok bool)
- 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) GetDeleteKey(key string) (inodeKey InodeKeyType, ok bool)
- func (d *DirtyMgr) GetDirMetaForNodeLeave(keys []InodeKeyType, nodeList *RaftNodeList) map[string][]InodeKeyType
- func (d *DirtyMgr) GetDirMetasForNodeJoin(dirMetas []InodeKeyType, migrationId MigrationId, nodeList *RaftNodeList, ...) []InodeKeyType
- 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[string][]InodeKeyType
- func (d *DirtyMgr) GetDirtyMetasForNodeJoin(migrationId MigrationId, nodeList *RaftNodeList, newRing *hashring.HashRing, ...) []InodeKeyType
- func (d *DirtyMgr) GetLikelyDirtyChunkInodeIds() []InodeKeyType
- func (d *DirtyMgr) IsDirtyChunk(chunk *Chunk) bool
- func (d *DirtyMgr) IsDirtyMeta(inodeKey InodeKeyType) (ok bool)
- func (d *DirtyMgr) IsRemoveChunkRecorded(migrationId MigrationId, inodeKey InodeKeyType, offset int64) bool
- func (d *DirtyMgr) IsRemoveDirMetaRecorded(migrationId MigrationId, inodeKey InodeKeyType) bool
- func (d *DirtyMgr) IsRemoveMetaRecorded(migrationId MigrationId, inodeKey InodeKeyType) bool
- func (d *DirtyMgr) RecordMigratedAddChunks(migrationId MigrationId, inodeKey InodeKeyType, chunkSize int64, ...)
- func (d *DirtyMgr) RecordMigratedAddMetas(migrationId MigrationId, metas []*common.CopiedMetaMsg, ...)
- func (d *DirtyMgr) RecordMigratedDirMetas(migrationId MigrationId, metas []*common.CopiedMetaMsg, ...)
- func (d *DirtyMgr) RecordMigratedRemoveChunks(migrationId MigrationId, inodeKey InodeKeyType, offset int64, version uint32)
- func (d *DirtyMgr) RecordMigratedRemoveDirMetas(migrationId MigrationId, keys ...InodeKeyType)
- func (d *DirtyMgr) RecordMigratedRemoveMetas(migrationId MigrationId, keys ...InodeKeyType)
- 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 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 FileHandle
- func (i *FileHandle) Flush(n *NodeServer) (meta *WorkingMeta, errno error)
- func (i *FileHandle) GetLength() int64
- func (i *FileHandle) Read(key string, offset int64, size int64, n *NodeServer, op interface{}) (data [][]byte, count int, errno error)
- func (i *FileHandle) ReadNoCache(key string, 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 FileIdType
- type FileOffsetPair
- type FillingInfo
- type FillingKey
- type FillingKey2
- 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 GetBlobInput
- type GetBlobOutput
- type HeadBlobInput
- type HeadBlobOutput
- type HeadIndexFilePair
- type InitNodeListOp
- type InodeKeyType
- type InodeMgr
- func (n *InodeMgr) AppendStagingChunkBuffer(inodeKey InodeKeyType, offset int64, chunkSize int64, buf []byte) (fileOffset int64, reply int32)
- func (n *InodeMgr) AppendStagingChunkFile(inodeKey InodeKeyType, offset int64, fileId FileIdType, fileOffset int64, ...) (reply int32)
- func (n *InodeMgr) ApplyAsAddInodeFileMap(extBuf []byte) (reply int32)
- func (n *InodeMgr) ApplyAsCommitUpdateChunk(extBuf []byte, dirtyMgr *DirtyMgr) int32
- func (n *InodeMgr) ApplyAsCreateChunk(extBuf []byte) (reply int32)
- func (n *InodeMgr) ApplyAsDeleteInodeMap(extBuf []byte) (reply int32)
- func (n *InodeMgr) ApplyAsDeletePersist(extBuf []byte, dirtyMgr *DirtyMgr) int32
- func (n *InodeMgr) ApplyAsDropLRUChunks(extBuf []byte) (reply int32)
- func (n *InodeMgr) ApplyAsPersistChunk(extBuf []byte, dirtyMgr *DirtyMgr) int32
- func (n *InodeMgr) ApplyAsUpdateMetaAttr(extBuf []byte) (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, fileOffset int64, ...)
- func (n *InodeMgr) CommitCreateMeta(working *WorkingMeta, newKey string, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitDeleteChunk(working *WorkingChunk, offset int64, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitDeleteInodeMap(deleted *common.DeleteInodeMapArgs)
- func (n *InodeMgr) CommitDeleteMeta(working *WorkingMeta, key string, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitDeletePersistMeta(key string, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitPersistChunk(inodeKey InodeKeyType, metaKey string, offsets []int64, cVers []uint32, ...)
- func (n *InodeMgr) CommitPersistMeta(inodeKey InodeKeyType, version uint32, ts int64, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitSetMetaAndInodeFile(working *WorkingMeta, key string)
- func (n *InodeMgr) CommitUpdateChunk(working *WorkingChunk, offset int64, chunkSize int64, dirtyMgr *DirtyMgr, ...)
- func (n *InodeMgr) CommitUpdateMeta(working *WorkingMeta, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CommitUpdateMetaKey(working *WorkingMeta, removedKey string, newKey string, dirtyMgr *DirtyMgr) *WorkingMeta
- func (n *InodeMgr) CommitUpdateParentMeta(working *WorkingMeta, key string, dirtyMgr *DirtyMgr)
- func (n *InodeMgr) CreateInodeId() InodeKeyType
- func (n *InodeMgr) DeleteInodeToFiles(inodeKeys []uint64)
- func (n *InodeMgr) DropLRUChunk(keys []uint64, offsets []int64)
- func (n *InodeMgr) GetAllDirectoryMeta() []InodeKeyType
- func (n *InodeMgr) GetAllMeta(inodeKeys []InodeKeyType) ([]*common.CopiedMetaMsg, []*common.InodeToFileMsg)
- func (n *InodeMgr) GetChunk(inodeKey InodeKeyType, offset int64, chunkSize int64) *Chunk
- func (n *InodeMgr) GetFilePathAndWorkingMeta(inodeId InodeKeyType) (string, *WorkingMeta, int32)
- func (n *InodeMgr) GetMetaHandler(inodeKey InodeKeyType) *Meta
- func (n *InodeMgr) GetOrFetchWorkingMeta(inodeKey InodeKeyType, key string, chunkSize int64, expireMs int32, ...) (*WorkingMeta, int32)
- func (n *InodeMgr) IsNodeSuspending() bool
- 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
- func (n *InodeMgr) PersistDeleteObject(ret *common.TwoPCPersistRecordMsg, metaKey string, meta *WorkingMeta, _ int) (reply int32)
- func (n *InodeMgr) PrefetchChunkThread(h MetaRWHandler, key string, offset int64)
- func (n *InodeMgr) PrepareCreateMeta(inodeKey InodeKeyType, parent MetaAttributes, chunkSize int64, expireMs int32, ...) (*WorkingMeta, func(*NodeServer), int32)
- func (n *InodeMgr) PreparePersistChunk(meta *WorkingMeta, offset int64) (chunk *Chunk, working *WorkingChunk, reply int32)
- func (n *InodeMgr) PreparePersistDeleteMeta(inodeKey InodeKeyType, key string, dirtyMgr *DirtyMgr) (*Meta, *WorkingMeta, int32)
- func (n *InodeMgr) PreparePersistMeta(inodeKey InodeKeyType, dirtyMgr *DirtyMgr) (*Meta, []string, *WorkingMeta, int32)
- func (n *InodeMgr) PrepareUpdateChunk(newMeta *WorkingMeta, alignedOffset int64) (chunk *Chunk, working *WorkingChunk)
- func (n *InodeMgr) PrepareUpdateMeta(inodeKey InodeKeyType) (*Meta, *WorkingMeta, func(*NodeServer), int32)
- func (n *InodeMgr) PrepareUpdateMetaKey(inodeKey InodeKeyType, oldKey string, parent MetaAttributes, chunkSize int64, ...) (*Meta, *WorkingMeta, func(*NodeServer), int32)
- func (n *InodeMgr) PutDirObject(ret *common.TwoPCPersistRecordMsg, metaKeys []string, meta *WorkingMeta, _ int) (reply int32)
- func (n *InodeMgr) PutEmptyObject(ret *common.TwoPCPersistRecordMsg, metaKeys []string, meta *WorkingMeta, _ int) (reply int32)
- func (n *InodeMgr) PutObject(ret *common.TwoPCPersistRecordMsg, metaKeys []string, meta *WorkingMeta, ...) (reply int32)
- func (n *InodeMgr) QuickCommitDeleteChunk(ring *hashring.HashRing, selfGroup string, meta *WorkingMeta, ...)
- func (n *InodeMgr) QuickCommitExpandChunk(ring *hashring.HashRing, selfGroup string, meta *WorkingMeta, ...)
- 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) RestoreMetas(metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg)
- func (n *InodeMgr) ResumeNode()
- func (n *InodeMgr) SetChunkNoLock(chunk *Chunk, h MetaRWHandler, key string) (*WorkingChunk, int32)
- func (n *InodeMgr) SuspendNode()
- func (n *InodeMgr) UnlockPersistMeta(meta *Meta, inodeKey InodeKeyType)
- func (n *InodeMgr) UpdateMetaAttr(attr MetaAttributes, ts int64) (*WorkingMeta, int32)
- func (n *InodeMgr) UpdateMetaXattr(inodeKey InodeKeyType, expireMs int32, dirtyMgr *DirtyMgr) int32
- func (n *InodeMgr) VectorReadChunk(h MetaRWHandler, key string, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, reply int32)
- type JoinMigrationOp
- type LeaveMigrationOp
- type LinkMetaOp
- 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 LogFile
- func (f *LogFile) AppendCommand(cmd AppendEntryCommand) (logIndex uint64, reply int32)
- func (f *LogFile) AppendCommandAt(logIndex uint64, cmd AppendEntryCommand) (reply int32)
- func (f *LogFile) CheckReset() (ok bool)
- func (f *LogFile) Clean()
- func (f *LogFile) CreateNewFile(newHeadIndex uint64) (reply int32)
- func (f *LogFile) GetCurrentLogLength() uint64
- func (f *LogFile) LoadCommandAt(logIndex uint64) (cmd AppendEntryCommand, reply int32)
- func (f *LogFile) SeekLog(logIndex uint64) (reply int32)
- type MakeBucketInput
- type MakeBucketOutput
- type MemoryPool
- type Meta
- type MetaAttributes
- type MetaRWHandler
- type MigrationId
- 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 NodeServer
- func (n *NodeServer) AbortWriteObject(recordMap map[string][]*common.StagingChunkMsg)
- func (n *NodeServer) Apply(l *AppendEntryCommand) (reply int32)
- func (n *NodeServer) CallCoordinator(fn CoordinatorOpBase) (ret CoordinatorRet, reply int32)
- func (n *NodeServer) CheckReset() (ok bool)
- func (n *NodeServer) CommitRecord(txIdMsg *common.TxIdMsg, nextSeqNum uint64, txType uint16, ...) int32
- func (n *NodeServer) CoreDump(_ context.Context, _ *api.Void) (*api.Void, error)
- func (n *NodeServer) CreateCoordinatorId() CoordinatorId
- func (n *NodeServer) CreateObject(parentKey string, parentAttr MetaAttributes, name string, ...) (meta *WorkingMeta, err error)
- func (n *NodeServer) DownloadChunkViaRemote(msg RpcMsg) (*common.DownloadChunkRet, []SlicedPageBuffer)
- func (n *NodeServer) DropCache(_ context.Context, _ *api.Void) (*api.ApiRet, error)
- 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) GetConfig(context.Context, *api.Void) (*api.GetConfigRet, error)
- func (n *NodeServer) GetMetaFromClusterOrCOS(inodeKey InodeKeyType, key string, parent MetaAttributes) (*WorkingMeta, error)
- func (n *NodeServer) GetMetaRpc(msg RpcMsg) *common.GetWorkingMetaRet
- func (n *NodeServer) GetTrackerNode(context.Context, *api.Void) (*api.GetTrackerNodeRet, error)
- func (n *NodeServer) HardLinkObject(srcInodeId fuseops.InodeID, srcParent MetaAttributes, dstParentKey string, ...) (meta *WorkingMeta, err error)
- func (n *NodeServer) Init(back *ObjCacheBackend)
- func (n *NodeServer) IsReady(_ context.Context, _ *api.Void) (*api.ApiRet, error)
- 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(msg RpcMsg) *common.Ack
- func (n *NodeServer) ReadAheadChunk(h MetaRWHandler, key string, offset int64, size int64)
- 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 MetaAttributes, 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) RestoreDirtyChunksTopHalf(msg RpcMsg, dataLength uint32, fd int, pipeFds [2]int, state *ReadRpcMsgState) (m proto.Message, fileId FileIdType, fileOffset int64, r RaftBasicReply)
- func (n *NodeServer) ResumeCoordinatorCommit()
- 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) SpliceChunk(fd int, pipeFds [2]int, state *ReadRpcMsgState, inodeKey InodeKeyType, ...) (fileId FileIdType, fileOffset int64, reply int32)
- func (n *NodeServer) StartGrpcServer()
- 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) UnlinkObject(parentFullPath string, parentId fuseops.InodeID, name string, ...) (err error)
- func (n *NodeServer) UpdateChunkTopHalf(msg RpcMsg, dataLength uint32, fd int, pipeFds [2]int, state *ReadRpcMsgState) (m proto.Message, fileId FileIdType, fileOffset int64, r RaftBasicReply)
- func (n *NodeServer) UpdateNodeListAsClient() error
- func (n *NodeServer) UpdateObjectAttr(attr MetaAttributes, ts int64) (meta *WorkingMeta, err error)
- func (n *NodeServer) VectorReadChunk(h MetaRWHandler, key string, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
- func (n *NodeServer) VectorReadFastPath(h MetaRWHandler, key string, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
- 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) (mfs *fuse.MountedFileSystem, 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() 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()
- func (fs *ObjcacheFileSystem) SetXattr(_ context.Context, op *fuseops.SetXattrOp) (err error)
- func (fs *ObjcacheFileSystem) Shutdown()
- 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 PageBuffer
- type PagePool
- type ParticipantOp
- type PutBlobInput
- type PutBlobOutput
- type RaftBasicReply
- type RaftFiles
- func (c *RaftFiles) AddDiskUsage(size int64) int64
- func (c *RaftFiles) CheckReset() (ok bool)
- func (c *RaftFiles) Clear()
- func (c *RaftFiles) DontNeed(fileId FileIdType)
- func (c *RaftFiles) GetDiskUsage() int64
- func (c *RaftFiles) GetFileLength(fileId FileIdType) int64
- func (c *RaftFiles) GetFileName(fileId FileIdType) string
- func (c *RaftFiles) Open(fileId FileIdType, mode int) (int, error)
- func (c *RaftFiles) OpenAndReadCache(fileId FileIdType, offset int64, length int32) ([]byte, int32)
- func (c *RaftFiles) OpenAndWriteCache(fileId FileIdType, buf []byte) (offset int64, length int32, reply int32)
- func (c *RaftFiles) Remove(fileId FileIdType) (int64, error)
- func (c *RaftFiles) ReserveRange(fileId FileIdType, dataLen int64) (offset int64)
- func (c *RaftFiles) Reset()
- func (c *RaftFiles) SeekRange(fileId FileIdType, newNextOffset int64)
- func (c *RaftFiles) Splice(pipeFds [2]int, fileId FileIdType, fd int, offset int64, dataLength int32, ...) (err error)
- func (c *RaftFiles) SyncWrite(fileId FileIdType, buf []byte) (offset int64, length int32, reply int32)
- type RaftGroupMgr
- func (m *RaftGroupMgr) Add(msg *common.NodeMsg)
- func (m *RaftGroupMgr) ApplyAsUpdateNodeListLocal(extBuf []byte) int32
- func (m *RaftGroupMgr) BeginRaftRead(raft *RaftInstance, nodeListVer uint64) (r RaftBasicReply)
- func (m *RaftGroupMgr) CheckReset() (ok bool)
- func (m *RaftGroupMgr) Clean()
- 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) SetNodeListDirect(nodes []*api.ApiNodeMsg, nodeListVer uint64)
- func (m *RaftGroupMgr) UpdateLeader(newLeader RaftNode) bool
- type RaftInstance
- func (n *RaftInstance) AddServerLocal(sa common.NodeAddrInet4, serverId uint32) int32
- func (n *RaftInstance) AppendBootstrapLogs(groupId string) int32
- func (n *RaftInstance) AppendEntriesLocal(cmd AppendEntryCommand) (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(extCmdId uint16, m proto.Message) int32
- func (n *RaftInstance) AppendInitEntry(cmd AppendEntryCommand) int32
- func (n *RaftInstance) ApplyAll(cmd *AppendEntryCommand, logIndex uint64) (currentLogLength uint64)
- func (n *RaftInstance) CatchUpLog(sa common.NodeAddrInet4, serverId uint32, timeout time.Duration) int32
- func (n *RaftInstance) CheckReset() (ok bool)
- func (n *RaftInstance) CleanExtFile()
- func (n *RaftInstance) GenerateCoordinatorId() CoordinatorId
- func (n *RaftInstance) GetExtFileId() FileIdType
- 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(fileId uint64, seqNum uint32)
- func (n *RaftInstance) Shutdown()
- func (n *RaftInstance) StartVoting()
- func (n *RaftInstance) StepDown(lastLogIndex uint64)
- func (n *RaftInstance) SyncBeforeClientQuery() (r RaftBasicReply)
- func (n *RaftInstance) WaitPreviousCommits()
- type RaftNode
- type RaftNodeList
- type RaftPersistState
- type ReadRpcMsgState
- type ReadSeekerCloser
- type ReaderBufferCache
- func (c *ReaderBufferCache) CheckReset() (ok bool)
- func (c *ReaderBufferCache) Delete(fileId FileIdType) (size int64)
- func (c *ReaderBufferCache) DropAll()
- func (c *ReaderBufferCache) EndFill(fileId FileIdType, offset int64)
- func (c *ReaderBufferCache) EndFillWithPut(reader *BufferedFilePageReader)
- func (c *ReaderBufferCache) GetCacheOrBeginFill(fileId FileIdType, offset int64) (reader *BufferedFilePageReader, beginFill bool)
- func (c *ReaderBufferCache) GetCacheWithFillWait(fileId FileIdType, stagPart *StagingChunkPart, offset int64) *BufferedFilePageReader
- func (c *ReaderBufferCache) GetNewBufferedFilePageReader(fileId FileIdType, stag *StagingChunk, blocking bool) (*BufferedFilePageReader, error)
- func (c *ReaderBufferCache) ReleaseInFlightBuffer(reader *BufferedFilePageReader)
- func (c *ReaderBufferCache) SetEvictable(reader *BufferedFilePageReader)
- func (c *ReaderBufferCache) TryBeginFill(fileId FileIdType, offset int64) (beginFill 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 RenameBlobInput
- type RenameBlobOutput
- type RenameMetaOp
- type RenameRet
- type RestoreDirtyChunkOp
- type RestoreDirtyMetaOp
- 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, files *RaftFiles, timeout time.Duration) (replyMsg RpcMsg, err error)
- func (w *RpcClient) UnicastRpcMsg(msg RpcMsg, sa common.NodeAddrInet4, files *RaftFiles, timeout time.Duration, ...) (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, files *RaftFiles, ...) (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, files *RaftFiles, wakeUpInterval time.Duration, dataBuf [][]byte, ...) (err error)
- func (w *RpcClientConnectionV2) StoreRpcArgs(seqNum uint64, args *RpcSeqNumArgs)
- func (w *RpcClientConnectionV2) Up()
- func (w *RpcClientConnectionV2) WaitAndGetRpcReply(seqNum uint64, timeout time.Duration) (msg RpcMsg, err error)
- type RpcClientV2
- func (w *RpcClientV2) AsyncObjcacheRpc(extCmdId uint16, args proto.Message, sa common.NodeAddrInet4, files *RaftFiles, ...) (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(nextTxId TxId, groups []string, txIds []TxId, retryInterval time.Duration)
- func (o *RpcMgr) AbortParticipant(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CallAny(fn ParticipantOp, txId TxId, remoteTimeout time.Duration) (ret RpcRet, r RaftBasicReply)
- func (o *RpcMgr) CallCoordinatorMetaInRPC(fn CoordinatorOpBase, id CoordinatorId, nodeListVer uint64) (CoordinatorRet, RaftBasicReply)
- func (o *RpcMgr) CallCoordinatorUpdateNodeListInRPC(fn CoordinatorUpdateNodeListOp, id CoordinatorId, nodeListVer uint64) (*common.MembershipListMsg, RaftBasicReply)
- func (o *RpcMgr) CallPrepareAny(fn ParticipantOp, txId TxId, remoteTimeout time.Duration) (ret RpcRet, reply int32)
- func (o *RpcMgr) CallRemote(fn ParticipantOp, retryInterval time.Duration) bool
- func (o *RpcMgr) CallRpcAnyNoFail(fn ParticipantOp, txId TxId, remoteTimeout time.Duration) (ret RpcRet)
- func (o *RpcMgr) CheckReset() (ok bool)
- func (o *RpcMgr) CommitDeleteChunk(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CommitExpandChunk(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CommitMigrationParticipant(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CommitParticipant(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CommitPersistChunk(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CommitUpdateChunk(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CoordinatorCreateObject(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorDeleteObject(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorDeletePersist(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorFlushObject(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorHardLinkObject(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorPersist(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorRenameObject(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorTruncateObject(msg RpcMsg) *common.CoordinatorRetMsg
- func (o *RpcMgr) CoordinatorUpdateNodeList(msg RpcMsg) *common.Ack
- func (o *RpcMgr) CreateChildMeta(msg RpcMsg) *common.MetaTxMsg
- func (o *RpcMgr) CreateMeta(msg RpcMsg) *common.MetaTxMsg
- func (o *RpcMgr) DeleteAndGet(seq TxId) (call RpcState, ok bool)
- func (o *RpcMgr) DeleteAndUnlockLocalAll(seqs ...TxId)
- func (o *RpcMgr) DeleteMeta(msg RpcMsg) *common.MetaTxWithPrevMsg
- func (o *RpcMgr) Enter(seq TxId) (call RpcState, duplicated bool, passed bool)
- func (o *RpcMgr) ExecCommitAbort(fn ParticipantOp, seq TxId, nodeListVer uint64) (RpcRet, RaftBasicReply)
- func (o *RpcMgr) ExecPrepare(fn ParticipantOp, seq TxId, nodeListVer uint64) (RpcRet, RaftBasicReply)
- func (o *RpcMgr) Get(seq TxId) (call RpcState, ok bool)
- func (o *RpcMgr) GetApiPort(msg RpcMsg) *common.GetApiPortRet
- func (o *RpcMgr) InitNodeList(msg RpcMsg) *common.UpdateNodeListRet
- func (o *RpcMgr) JoinMigration(msg RpcMsg) *common.Ack
- func (o *RpcMgr) LeaveMigration(msg RpcMsg) *common.Ack
- func (o *RpcMgr) LinkMeta(msg RpcMsg) *common.RenameRetMsg
- func (o *RpcMgr) MpuAdd(msg RpcMsg) *common.MpuAddRet
- func (o *RpcMgr) Record(seq TxId, ret RpcRet)
- func (o *RpcMgr) RenameMeta(msg RpcMsg) *common.MetaTxMsg
- func (o *RpcMgr) RestoreDirtyChunksBottomHalf(m proto.Message, fileId FileIdType, fileOffset int64, dataLength uint32, ...) *common.Ack
- func (o *RpcMgr) RestoreDirtyMeta(msg RpcMsg) *common.Ack
- func (o *RpcMgr) TruncateMeta(msg RpcMsg) *common.MetaTxWithPrevMsg
- func (o *RpcMgr) UnlinkMeta(msg RpcMsg) *common.RenameRetMsg
- func (o *RpcMgr) UpdateChunkBottomHalf(m proto.Message, fileId FileIdType, fileOffset int64, dataLength uint32, ...) *common.UpdateChunkRet
- func (o *RpcMgr) UpdateMetaAttr(msg RpcMsg) *common.MetaTxMsg
- func (o *RpcMgr) UpdateMetaKey(msg RpcMsg) *common.MetaTxMsg
- func (o *RpcMgr) UpdateMetaSize(msg RpcMsg) *common.MetaTxWithPrevMsg
- func (o *RpcMgr) UpdateNodeList(msg RpcMsg) *common.UpdateNodeListRet
- type RpcMsg
- func (d *RpcMsg) CreateOptControlHeader(totalFileLength 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() (totalFileLength 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) SetTotalFileLength(totalFileLength 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 SlicedPageBuffer
- type StagingChunk
- func (s *StagingChunk) AppendToLog(inodeMgr *InodeMgr, reader *BufferedFilePageReader, fetchKey string) (err error)
- func (s *StagingChunk) GetObject(inodeMgr *InodeMgr, reader *BufferedFilePageReader, fetchOffset int64) error
- func (s *StagingChunk) ReadObject(inodeMgr *InodeMgr, reader *BufferedFilePageReader) (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 TruncateMetaOp
- type TwoPCCommitRecord
- type Tx
- type TxId
- type TxMgr
- func (m *TxMgr) ApplyAsAbortTx(extBuf []byte) (reply int32)
- func (m *TxMgr) ApplyAsBeginPersist(extBuf []byte) int32
- func (m *TxMgr) ApplyAsCommitMigration(extBuf []byte, inodeMgr *InodeMgr, dirtyMgr *DirtyMgr, groupMgr *RaftGroupMgr) int32
- func (m *TxMgr) ApplyAsCommitTx(inodeMgr *InodeMgr, dirtyMgr *DirtyMgr, raftGroup *RaftGroupMgr, ...) int32
- func (m *TxMgr) ApplyAsCreateMeta(extBuf []byte) (reply int32)
- func (m *TxMgr) ApplyAsCreateMetaCoordinator(extBuf []byte, inodeMgr *InodeMgr, dirtyMgr *DirtyMgr, raftGroup *RaftGroupMgr) (reply int32)
- func (m *TxMgr) ApplyAsDeleteMeta(extBuf []byte) (reply int32)
- func (m *TxMgr) ApplyAsDeleteMetaCoordinator(extBuf []byte, inodeMgr *InodeMgr, dirtyMgr *DirtyMgr, raftGroup *RaftGroupMgr) (reply int32)
- func (m *TxMgr) ApplyAsPersist(extBuf []byte, inodeMgr *InodeMgr, dirtyMgr *DirtyMgr, raftGroup *RaftGroupMgr) int32
- func (m *TxMgr) ApplyAsRenameCoordinator(extBuf []byte, inodeMgr *InodeMgr, dirtyMgr *DirtyMgr, raftGroup *RaftGroupMgr) (reply int32)
- func (m *TxMgr) ApplyAsUpdateMeta(extBuf []byte) (reply int32)
- func (m *TxMgr) ApplyAsUpdateMetaCoordinator(extBuf []byte, inodeMgr *InodeMgr, dirtyMgr *DirtyMgr, raftGroup *RaftGroupMgr) (reply int32)
- func (m *TxMgr) ApplyAsUpdateMetaKey(extBuf []byte) (reply int32)
- func (m *TxMgr) ApplyAsUpdateNodeList(extBuf []byte) int32
- func (m *TxMgr) ApplyAsUpdateNodeListCoordinator(extBuf []byte) int32
- func (m *TxMgr) ApplyAsUpdateParentMeta(extBuf []byte) (reply int32)
- type UnlinkMetaOp
- type UpdateChunkOp
- type UpdateMetaAttrOp
- type UpdateMetaKeyOp
- type UpdateMetaSizeOp
- type UpdateNodeListOp
- 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 ( AppendEntryCommandLogBaseSize = int32(crc32.Size + 7) AppendEntryCommandLogSize = AppendEntryCommandLogBaseSize + int32(AppendEntryFileCmdLength) AppendEntryFileCmdLength = uint8(28) AppendEntryNoOpCmdLength = uint8(0) AppendEntryAddServerCmdLength = uint8(10) AppendEntryRemoveServerCmdLength = uint8(4) AppendEntryCommitTxCmdLength = uint8(16) AppendEntryResetExtLogCmdLength = uint8(12) )
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 ( 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 ( 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) AppendEntryUpdateMetaCoordinatorCmdId = DataCmdIdBit | uint16(4) AppendEntryCommitChunkCmdId = DataCmdIdBit | uint16(5) AppendEntryAbortTxCmdId = DataCmdIdBit | uint16(6) AppendEntryPersistChunkCmdId = DataCmdIdBit | uint16(7) AppendEntryBeginPersistCmdId = DataCmdIdBit | uint16(8) AppendEntryPersistCmdId = DataCmdIdBit | uint16(9) AppendEntryUpdateNodeListCoordinatorCmdId = DataCmdIdBit | uint16(10) AppendEntryUpdateNodeListCmdId = DataCmdIdBit | uint16(11) AppendEntryUpdateNodeListLocalCmdId = DataCmdIdBit | uint16(12) AppendEntryCommitMigrationCmdId = DataCmdIdBit | uint16(13) AppendEntryCreateMetaCoordinatorCmdId = DataCmdIdBit | uint16(14) AppendEntryUpdateMetaKeyCmdId = DataCmdIdBit | uint16(15) AppendEntryRenameCoordinatorCmdId = DataCmdIdBit | uint16(16) AppendEntryCreateMetaCmdId = DataCmdIdBit | uint16(17) AppendEntryDeleteMetaCmdId = DataCmdIdBit | uint16(18) AppendEntryDeleteMetaCoordinatorCmdId = DataCmdIdBit | uint16(19) AppendEntryDeletePersistCmdId = DataCmdIdBit | uint16(20) AppendEntryUpdateParentMetaCmdId = DataCmdIdBit | uint16(21) AppendEntryAddInodeFileMapCmdId = DataCmdIdBit | uint16(22) AppendEntryDropLRUChunksCmdId = DataCmdIdBit | uint16(23) AppendEntryCreateChunkCmdId = DataCmdIdBit | uint16(24) AppendEntryUpdateMetaAttrCmdId = DataCmdIdBit | uint16(25) AppendEntryDeleteInodeFileMapCmdId = DataCmdIdBit | uint16(26) AppendEntryRemoveNonDirtyChunksCmdId = DataCmdIdBit | uint16(27) AppendEntryForgetAllDirtyLogCmdId = DataCmdIdBit | uint16(28) RpcGetMetaInClusterCmdId = uint16(1) RpcGetMetaCmdId = uint16(2) RpcDownloadChunkViaRemoteCmdId = uint16(3) RpcPrefetchChunkCmdId = uint16(4) RpcRestoreDirtyMetasCmdId = uint16(5) RpcGetApiIpAndPortCmdId = uint16(6) RpcUpdateChunkCmdId = DataCmdIdBit | uint16(10) RpcRestoreDirtyChunksCmdId = DataCmdIdBit | uint16(11) RpcCommitParticipantCmdId = uint16(20) RpcCommitMigrationParticipantCmdId = uint16(21) RpcAbortParticipantCmdId = uint16(22) RpcCreateMetaCmdId = uint16(30) RpcLinkMetaCmdId = uint16(31) RpcTruncateMetaCmdId = uint16(32) RpcUpdateMetaSizeCmdId = uint16(33) RpcDeleteMetaCmdId = uint16(34) RpcUnlinkMetaCmdId = uint16(35) RpcRenameMetaCmdId = uint16(36) RpcCommitUpdateChunkCmdId = uint16(37) RpcCommitDeleteChunkCmdId = uint16(38) RpcCommitExpandChunkCmdId = uint16(39) RpcCommitPersistChunkCmdId = uint16(40) RpcUpdateNodeListCmdId = uint16(41) RpcInitNodeListCmdId = uint16(42) RpcMpuAddCmdId = uint16(43) RpcJoinMigrationCmdId = uint16(44) RpcLeaveMigrationCmdId = uint16(45) RpcCreateChildMetaCmdId = uint16(46) RpcUpdateMetaKeyCmdId = uint16(47) RpcUpdateMetaAttrCmdId = uint16(48) RpcGetApiPortCmdId = uint16(49) RpcCoordinatorUpdateNodeListCmdId = uint16(50) RpcCoordinatorAbortTxCmdId = uint16(51) RpcCoordinatorFlushObjectCmdId = uint16(52) RpcCoordinatorTruncateObjectCmdId = uint16(53) RpcCoordinatorDeleteObjectCmdId = uint16(54) RpcCoordinatorHardLinkObjectCmdId = uint16(55) RpcCoordinatorRenameObjectCmdId = uint16(56) RpcCoordinatorCreateObjectCmdId = uint16(57) RpcCoordinatorPersistCmdId = uint16(58) RpcCoordinatorDeletePersistCmdId = uint16(59) )
AppendEntryHeartBeatCmdId = uint16(0)
const ( TxUpdateMeta = 0 TxUpdateChunk = 1 TxDeleteChunk = 2 TxAddNodes = 3 TxRemoveNodes = 4 TxUpdateMetaKey = 5 TxDeleteMeta = 6 TxCreateMeta = 7 TxUpdateParentMeta = 8 TxUpdateCoordinator = 30 TxDeleteCoordinator = 31 TxBeginPersistCoordinator = 32 TxPersistCoordinator = 33 TxUpdateNodeListCoordinator = 34 TxCreateCoordinator = 35 TxRenameCoordinator = 36 TxTruncateCoordinator = 37 )
const ( ObjCacheReplyErrBase = RaftReplyExt + 0 ObjCacheReplySuspending = ObjCacheReplyErrBase + 1 ObjCacheIsNotDirty = ObjCacheReplyErrBase + 2 FuseReplyErrBase = RaftReplyExt + 10 )
const INIT_ERR_BLOB = "mount.err"
const ObjcacheDirName = ".objcache"
const (
RaftFileCacheLimit = 100
)
const RaftPersistStateReset = uint32(math.MaxUint32)
const TrackerNodeKey = InodeKeyType(math.MaxUint64)
Variables ¶
var AccessLinkHead = Chunk{}
var AccessLinkLock sync.Mutex
var MaxTime = time.Unix(1<<63-62135596801, 999999999)
var PageSize = int64(os.Getpagesize())
var RandString = MyRandString{/* contains filtered or unexported fields */}
var SectorSize = 512
var TotalDown int32
var TotalUp int32
Functions ¶
func AwsErrToReply ¶
func CalculateBufferLengthForDownload ¶
func CalculateBufferLengthForDownload(h MetaRWHandler, offset int64) int
func CallGetApiPort ¶
func CallGetApiPort(n *NodeServer, sa common.NodeAddrInet4) (apiPort int, reply int32)
func CollectLRUChunks ¶
func CollectLRUChunks(dirtyMgr *DirtyMgr, raft *RaftInstance, reclaimDiskBytes int64) *common.DropLRUChunksArgs
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 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 NewRenameRetFromMsg ¶
func NewRenameRetFromMsg(msg *common.RenameRetMsg) (*RenameRet, RaftBasicReply)
func NewSaFromApiNodeMsg ¶
func NewSaFromApiNodeMsg(msg *api.ApiNodeMsg) (ret common.NodeAddrInet4)
func NewSaFromNodeMsg ¶
func NewSaFromNodeMsg(msg *common.NodeMsg) (ret common.NodeAddrInet4)
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, files *RaftFiles, 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 NewAbortParticipantOp(rpcSeqNum TxId, abortTxIds []*common.TxIdMsg, groupId string) AbortParticipantOp
func (AbortParticipantOp) GetLeader ¶
func (o AbortParticipantOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type AppendEntryCommand ¶
type AppendEntryCommand struct {
// contains filtered or unexported fields
}
func NewAppendEntryAddServerCommand ¶
func NewAppendEntryAddServerCommand(term uint32, serverId uint32, ip [4]byte, port uint16) (cmd AppendEntryCommand)
func NewAppendEntryCommitTxCommand ¶
func NewAppendEntryCommitTxCommand(term uint32, txId *common.TxIdMsg) (cmd AppendEntryCommand)
func NewAppendEntryDeleteExtLogCommand ¶
func NewAppendEntryDeleteExtLogCommand(term uint32, fileId uint64) (cmd AppendEntryCommand)
func NewAppendEntryFileCommand ¶
func NewAppendEntryFileCommand(term uint32, extCmdId uint16, fileId FileIdType, fileOffset int64, fileContent []byte) (cmd AppendEntryCommand)
func NewAppendEntryFileCommandFromFile ¶
func NewAppendEntryFileCommandFromFile(term uint32, extCmdId uint16, fileId FileIdType, fileOffset int64, dataLen uint32, fileName string) (cmd AppendEntryCommand, err error)
func NewAppendEntryNoOpCommandDiskFormat ¶
func NewAppendEntryNoOpCommandDiskFormat(term uint32) (cmd AppendEntryCommand)
func NewAppendEntryRemoveServerCommand ¶
func NewAppendEntryRemoveServerCommand(term uint32, serverId uint32) (cmd AppendEntryCommand)
func NewAppendEntryResetExtLogCommand ¶
func NewAppendEntryResetExtLogCommand(term uint32, fileId uint64, nextSeqNum uint32) (cmd AppendEntryCommand)
func (*AppendEntryCommand) AppendToRpcMsg ¶
func (l *AppendEntryCommand) AppendToRpcMsg(d *RpcMsg) (newOptHeaderLength uint16, newTotalFileLength uint32)
func (*AppendEntryCommand) GetAsAddServer ¶
func (l *AppendEntryCommand) GetAsAddServer() (serverId uint32, ip [4]byte, port uint16)
func (*AppendEntryCommand) GetAsAppendEntryFile ¶
func (l *AppendEntryCommand) GetAsAppendEntryFile() (fileId FileIdType, fileLength int32, fileOffset int64)
func (*AppendEntryCommand) GetAsCommitTx ¶
func (l *AppendEntryCommand) GetAsCommitTx() (clientId uint32, seqNum uint32, txSeqNum uint64)
func (*AppendEntryCommand) GetAsRemoveServer ¶
func (l *AppendEntryCommand) GetAsRemoveServer() (serverId uint32)
func (*AppendEntryCommand) GetAsResetExtLog ¶
func (l *AppendEntryCommand) GetAsResetExtLog() (fileId uint64, nextSeqNum uint32)
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 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 BufferedFilePageReader ¶
type BufferedFilePageReader 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.
- BufferedFilePageReader must still return the range [o, o + dataLen] regardless of reading more than it.
- bf: bufFileOffset 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 NewBufferedFilePageReaderFromStag ¶
func NewBufferedFilePageReaderFromStag(page *PageBuffer, fileId FileIdType, fileOffset int64, dataLen int64) *BufferedFilePageReader
func (*BufferedFilePageReader) GetSlicedPageBufferAt ¶
func (r *BufferedFilePageReader) 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 CachedCommand ¶
type CachedCommand struct {
// contains filtered or unexported fields
}
type Capabilities ¶
type Chunk ¶
type Chunk struct {
// contains filtered or unexported fields
}
func CreateNewChunk ¶
func CreateNewChunk(inodeKey InodeKeyType, offset int64, files *RaftFiles) *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) GetFileId ¶
func (c *Chunk) GetFileId() FileIdType
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) DontNeed ¶
func (r *ChunkReader) DontNeed(raft *RaftInstance)
func (*ChunkReader) GetBufferDirect ¶
func (r *ChunkReader) GetBufferDirect(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 CommandCache ¶
type CommandCache struct {
// contains filtered or unexported fields
}
func NewCommandCache ¶
func NewCommandCache(maxLength int) CommandCache
func (CommandCache) CheckReset ¶
func (c CommandCache) CheckReset() (ok bool)
func (*CommandCache) Clean ¶
func (c *CommandCache) Clean()
func (CommandCache) Get ¶
func (c CommandCache) Get(index uint64) (cmd AppendEntryCommand, ok bool)
func (CommandCache) Put ¶
func (c CommandCache) Put(index uint64, cmd AppendEntryCommand)
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) GetLeader ¶
func (o CommitDeleteChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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) GetLeader ¶
func (o CommitExpandChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CommitMigrationParticipantOp ¶
type CommitMigrationParticipantOp struct {
// contains filtered or unexported fields
}
func NewCommitMigrationParticipantOp ¶
func NewCommitMigrationParticipantOp(rpcSeqNum TxId, commitTxId TxId, groupId string, nodeListVer uint64, addr *common.NodeAddrInet4, migrationId MigrationId) CommitMigrationParticipantOp
func (CommitMigrationParticipantOp) GetLeader ¶
func (o CommitMigrationParticipantOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CommitParticipantOp ¶
type CommitParticipantOp struct {
// contains filtered or unexported fields
}
func NewCommitParticipantOp ¶
func NewCommitParticipantOp(rpcSeqNum TxId, commitTxId TxId, groupId string) CommitParticipantOp
func (CommitParticipantOp) GetLeader ¶
func (o CommitParticipantOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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, newFetchKey string) CommitPersistChunkOp
func (CommitPersistChunkOp) GetLeader ¶
func (o CommitPersistChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CommitUpdateChunkOp ¶
type CommitUpdateChunkOp struct {
// contains filtered or unexported fields
}
func NewCommitUpdateChunkOp ¶
func NewCommitUpdateChunkOp(txId TxId, record *common.UpdateChunkRecordMsg, newMeta *WorkingMeta) CommitUpdateChunkOp
func (CommitUpdateChunkOp) GetLeader ¶
func (o CommitUpdateChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorCreateObjectOp ¶
type CoordinatorCreateObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorCreateObjectOp ¶
func NewCoordinatorCreateObjectOp(parentFullPath string, parentAttr MetaAttributes, childName string, childAttr MetaAttributes, chunkSize int64, expireMs int32) CoordinatorCreateObjectOp
func (CoordinatorCreateObjectOp) GetLeader ¶
func (o CoordinatorCreateObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorDeleteObjectOp ¶
type CoordinatorDeleteObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorDeleteObjectOp ¶
func NewCoordinatorDeleteObjectOp(parentFullPath string, parentInodeKey InodeKeyType, childName string, childInodeKey InodeKeyType) CoordinatorDeleteObjectOp
func (CoordinatorDeleteObjectOp) GetLeader ¶
func (o CoordinatorDeleteObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorDeletePersistOp ¶
type CoordinatorDeletePersistOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorDeletePersistOp ¶
func NewCoordinatorDeletePersistOp(key string, inodeKey InodeKeyType, priority int) CoordinatorDeletePersistOp
func (CoordinatorDeletePersistOp) GetLeader ¶
func (o CoordinatorDeletePersistOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorFlushObjectOp ¶
type CoordinatorFlushObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorFlushObjectOp ¶
func NewCoordinatorFlushObjectOp(inodeKey InodeKeyType, records []*common.UpdateChunkRecordMsg, mTime int64, mode uint32) CoordinatorFlushObjectOp
func (CoordinatorFlushObjectOp) GetLeader ¶
func (o CoordinatorFlushObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorHardLinkOp ¶
type CoordinatorHardLinkOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorHardLinkOp ¶
func NewCoordinatorHardLinkOp(srcInodeKey InodeKeyType, srcParent MetaAttributes, dstParentKey string, dstParentInodeKey InodeKeyType, dstName string, childAttr MetaAttributes) CoordinatorHardLinkOp
func (CoordinatorHardLinkOp) GetLeader ¶
func (o CoordinatorHardLinkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorId ¶
type CoordinatorId struct {
// contains filtered or unexported fields
}
func NewCoordinatorIdFromMsg ¶
func NewCoordinatorIdFromMsg(msg *common.CoordinatorIdMsg) CoordinatorId
type CoordinatorOpBase ¶
type CoordinatorOpBase interface { GetLeader(*NodeServer, *RaftNodeList) (RaftNode, bool) // contains filtered or unexported methods }
type CoordinatorPersistOp ¶
type CoordinatorPersistOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorPersistOp ¶
func NewCoordinatorPersistOp(inodeKey InodeKeyType, priority int) CoordinatorPersistOp
func (CoordinatorPersistOp) GetLeader ¶
func (o CoordinatorPersistOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorRenameObjectOp ¶
type CoordinatorRenameObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorRenameObjectOp ¶
func NewCoordinatorRenameObjectOp(srcParentKey string, srcParent MetaAttributes, srcName string, dstParentKey string, dstParentInodeKey InodeKeyType, dstName string, childAttr MetaAttributes) CoordinatorRenameObjectOp
func (CoordinatorRenameObjectOp) CheckError ¶
func (o CoordinatorRenameObjectOp) CheckError(unlink RenameRet, link RenameRet) int32
func (CoordinatorRenameObjectOp) GetLeader ¶
func (o CoordinatorRenameObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorRet ¶
type CoordinatorRet struct {
// contains filtered or unexported fields
}
func NewCoordinatorRetFromMsg ¶
func NewCoordinatorRetFromMsg(msg *common.CoordinatorRetMsg) CoordinatorRet
type CoordinatorTruncateObjectOp ¶
type CoordinatorTruncateObjectOp struct {
// contains filtered or unexported fields
}
func NewCoordinatorTruncateObjectOp ¶
func NewCoordinatorTruncateObjectOp(inodeKey InodeKeyType, newSize int64) CoordinatorTruncateObjectOp
func (CoordinatorTruncateObjectOp) GetLeader ¶
func (o CoordinatorTruncateObjectOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CoordinatorUpdateNodeListOp ¶
type CoordinatorUpdateNodeListOp struct {
// contains filtered or unexported fields
}
func (CoordinatorUpdateNodeListOp) GetLeader ¶
func (o CoordinatorUpdateNodeListOp) GetLeader(_ *NodeServer, _ *RaftNodeList) (RaftNode, bool)
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, childName string, childAttr MetaAttributes) CreateChildMetaOp
func (CreateChildMetaOp) GetLeader ¶
func (o CreateChildMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type CreateMetaOp ¶
type CreateMetaOp struct {
// contains filtered or unexported fields
}
func NewCreateMetaOp ¶
func NewCreateMetaOp(txId TxId, inodeKey InodeKeyType, parentInodeAttr MetaAttributes, newKey string, mode uint32, chunkSize int64, expireMs int32) CreateMetaOp
func (CreateMetaOp) GetLeader ¶
func (o CreateMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type DataCache ¶
type DataCache struct {
// contains filtered or unexported fields
}
func NewDataCache ¶
func (*DataCache) CheckReset ¶
type DataCacheKey ¶
type DataCacheKey struct {
// contains filtered or unexported fields
}
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 DeleteMetaOp ¶
type DeleteMetaOp struct {
// contains filtered or unexported fields
}
func NewDeleteMetaOp ¶
func NewDeleteMetaOp(txId TxId, inodeKey InodeKeyType, removedKey string) DeleteMetaOp
func (DeleteMetaOp) GetLeader ¶
func (o DeleteMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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) AddChunkNoLock ¶
func (*DirtyMgr) AddDeleteKeyNoLock ¶
func (d *DirtyMgr) AddDeleteKeyNoLock(key string, meta *WorkingMeta)
func (*DirtyMgr) AddMetaNoLock ¶
func (d *DirtyMgr) AddMetaNoLock(meta *WorkingMeta)
func (*DirtyMgr) AppendCommitMigrationLog ¶
func (d *DirtyMgr) AppendCommitMigrationLog(raft *RaftInstance, txId TxId, migrationId MigrationId) int32
func (*DirtyMgr) AppendForgetAllDirtyLog ¶
func (d *DirtyMgr) AppendForgetAllDirtyLog(raft *RaftInstance) int32
func (*DirtyMgr) AppendRemoveNonDirtyChunksLog ¶
func (d *DirtyMgr) AppendRemoveNonDirtyChunksLog(raft *RaftInstance, fps []uint64) int32
func (*DirtyMgr) ApplyAsForgetAllDirty ¶
func (*DirtyMgr) ApplyAsRemoveNonDirtyChunks ¶
func (*DirtyMgr) CheckReset ¶
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) GetDeleteKey ¶
func (d *DirtyMgr) GetDeleteKey(key string) (inodeKey InodeKeyType, ok bool)
func (*DirtyMgr) GetDirMetaForNodeLeave ¶
func (d *DirtyMgr) GetDirMetaForNodeLeave(keys []InodeKeyType, nodeList *RaftNodeList) map[string][]InodeKeyType
func (*DirtyMgr) GetDirMetasForNodeJoin ¶
func (d *DirtyMgr) GetDirMetasForNodeJoin(dirMetas []InodeKeyType, migrationId MigrationId, nodeList *RaftNodeList, newRing *hashring.HashRing, selfGroup string, joinGroup string) []InodeKeyType
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[string][]InodeKeyType
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) []InodeKeyType
func (*DirtyMgr) GetLikelyDirtyChunkInodeIds ¶
func (d *DirtyMgr) GetLikelyDirtyChunkInodeIds() []InodeKeyType
func (*DirtyMgr) IsDirtyChunk ¶
func (*DirtyMgr) IsDirtyMeta ¶
func (d *DirtyMgr) IsDirtyMeta(inodeKey InodeKeyType) (ok bool)
func (*DirtyMgr) IsRemoveChunkRecorded ¶
func (d *DirtyMgr) IsRemoveChunkRecorded(migrationId MigrationId, inodeKey InodeKeyType, offset int64) bool
func (*DirtyMgr) IsRemoveDirMetaRecorded ¶
func (d *DirtyMgr) IsRemoveDirMetaRecorded(migrationId MigrationId, inodeKey InodeKeyType) bool
func (*DirtyMgr) IsRemoveMetaRecorded ¶
func (d *DirtyMgr) IsRemoveMetaRecorded(migrationId MigrationId, inodeKey InodeKeyType) bool
func (*DirtyMgr) RecordMigratedAddChunks ¶
func (d *DirtyMgr) RecordMigratedAddChunks(migrationId MigrationId, inodeKey InodeKeyType, chunkSize int64, chunk *WorkingChunk, offset int64, objectSize int64)
func (*DirtyMgr) RecordMigratedAddMetas ¶
func (d *DirtyMgr) RecordMigratedAddMetas(migrationId MigrationId, metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg)
func (*DirtyMgr) RecordMigratedDirMetas ¶
func (d *DirtyMgr) RecordMigratedDirMetas(migrationId MigrationId, metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg)
func (*DirtyMgr) RecordMigratedRemoveChunks ¶
func (d *DirtyMgr) RecordMigratedRemoveChunks(migrationId MigrationId, inodeKey InodeKeyType, offset int64, version uint32)
func (*DirtyMgr) RecordMigratedRemoveDirMetas ¶
func (d *DirtyMgr) RecordMigratedRemoveDirMetas(migrationId MigrationId, keys ...InodeKeyType)
func (*DirtyMgr) RecordMigratedRemoveMetas ¶
func (d *DirtyMgr) RecordMigratedRemoveMetas(migrationId MigrationId, keys ...InodeKeyType)
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 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 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(key string, offset int64, size int64, n *NodeServer, op interface{}) (data [][]byte, count int, errno error)
func (*FileHandle) ReadNoCache ¶
func (i *FileHandle) ReadNoCache(key string, 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 FileIdType ¶
type FileIdType struct {
// contains filtered or unexported fields
}
func GetAppendEntryFileArgs ¶
func GetAppendEntryFileArgs(extEntryPayload []byte) (fileId FileIdType, fileLength int32, fileOffset int64)
func NewFileIdTypeFromBuf ¶
func NewFileIdTypeFromBuf(buf []byte) FileIdType
func NewFileIdTypeFromInodeKey ¶
func NewFileIdTypeFromInodeKey(inodeKey InodeKeyType, offset int64, chunkSize int64) FileIdType
func (FileIdType) IsValid ¶
func (f FileIdType) IsValid() bool
func (FileIdType) Put ¶
func (f FileIdType) Put(buf []byte)
type FileOffsetPair ¶
type FileOffsetPair struct {
// contains filtered or unexported fields
}
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 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 GetBlobInput ¶
type GetBlobOutput ¶
type GetBlobOutput struct { HeadBlobOutput Body io.ReadCloser RequestId string }
type HeadBlobInput ¶
type HeadBlobInput struct {
Key string
}
type HeadBlobOutput ¶
type HeadIndexFilePair ¶
type HeadIndexFilePair struct {
// contains filtered or unexported fields
}
type InitNodeListOp ¶
type InitNodeListOp struct {
// contains filtered or unexported fields
}
func NewInitNodeListOp ¶
func NewInitNodeListOp(txId TxId, nodeList *RaftNodeList, target RaftNode, migrationId MigrationId) InitNodeListOp
func (InitNodeListOp) GetLeader ¶
func (o InitNodeListOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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) AppendStagingChunkFile ¶
func (n *InodeMgr) AppendStagingChunkFile(inodeKey InodeKeyType, offset int64, fileId FileIdType, fileOffset int64, dataLength uint32) (reply int32)
func (*InodeMgr) ApplyAsAddInodeFileMap ¶
func (*InodeMgr) ApplyAsCommitUpdateChunk ¶
func (*InodeMgr) ApplyAsCreateChunk ¶
func (*InodeMgr) ApplyAsDeleteInodeMap ¶
func (*InodeMgr) ApplyAsDeletePersist ¶
func (*InodeMgr) ApplyAsDropLRUChunks ¶
func (*InodeMgr) ApplyAsPersistChunk ¶
func (*InodeMgr) ApplyAsUpdateMetaAttr ¶
func (*InodeMgr) CheckReset ¶
func (*InodeMgr) CommitCreateChunk ¶
func (*InodeMgr) CommitCreateMeta ¶
func (n *InodeMgr) CommitCreateMeta(working *WorkingMeta, newKey string, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitDeleteChunk ¶
func (n *InodeMgr) CommitDeleteChunk(working *WorkingChunk, offset int64, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitDeleteInodeMap ¶
func (n *InodeMgr) CommitDeleteInodeMap(deleted *common.DeleteInodeMapArgs)
func (*InodeMgr) CommitDeleteMeta ¶
func (n *InodeMgr) CommitDeleteMeta(working *WorkingMeta, key string, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitDeletePersistMeta ¶
func (*InodeMgr) CommitPersistChunk ¶
func (*InodeMgr) CommitPersistMeta ¶
func (n *InodeMgr) CommitPersistMeta(inodeKey InodeKeyType, version uint32, ts int64, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitSetMetaAndInodeFile ¶
func (n *InodeMgr) CommitSetMetaAndInodeFile(working *WorkingMeta, key string)
func (*InodeMgr) CommitUpdateChunk ¶
func (*InodeMgr) CommitUpdateMeta ¶
func (n *InodeMgr) CommitUpdateMeta(working *WorkingMeta, dirtyMgr *DirtyMgr)
func (*InodeMgr) CommitUpdateMetaKey ¶
func (n *InodeMgr) CommitUpdateMetaKey(working *WorkingMeta, removedKey string, newKey string, dirtyMgr *DirtyMgr) *WorkingMeta
func (*InodeMgr) CommitUpdateParentMeta ¶
func (n *InodeMgr) CommitUpdateParentMeta(working *WorkingMeta, key string, dirtyMgr *DirtyMgr)
func (*InodeMgr) CreateInodeId ¶
func (n *InodeMgr) CreateInodeId() InodeKeyType
func (*InodeMgr) DeleteInodeToFiles ¶
func (*InodeMgr) DropLRUChunk ¶
func (*InodeMgr) GetAllDirectoryMeta ¶
func (n *InodeMgr) GetAllDirectoryMeta() []InodeKeyType
func (*InodeMgr) GetAllMeta ¶
func (n *InodeMgr) GetAllMeta(inodeKeys []InodeKeyType) ([]*common.CopiedMetaMsg, []*common.InodeToFileMsg)
func (*InodeMgr) GetChunk ¶
func (n *InodeMgr) GetChunk(inodeKey InodeKeyType, offset int64, chunkSize int64) *Chunk
func (*InodeMgr) GetFilePathAndWorkingMeta ¶
func (n *InodeMgr) GetFilePathAndWorkingMeta(inodeId InodeKeyType) (string, *WorkingMeta, int32)
func (*InodeMgr) GetMetaHandler ¶
func (n *InodeMgr) GetMetaHandler(inodeKey InodeKeyType) *Meta
func (*InodeMgr) GetOrFetchWorkingMeta ¶
func (n *InodeMgr) GetOrFetchWorkingMeta(inodeKey InodeKeyType, key string, chunkSize int64, expireMs int32, parent MetaAttributes) (*WorkingMeta, int32)
func (*InodeMgr) IsNodeSuspending ¶
must hold n.nodeLock.RLock
func (*InodeMgr) NewWorkingMetaForRoot ¶
func (n *InodeMgr) NewWorkingMetaForRoot() *WorkingMeta
func (*InodeMgr) PersistDeleteObject ¶
func (n *InodeMgr) PersistDeleteObject(ret *common.TwoPCPersistRecordMsg, metaKey string, meta *WorkingMeta, _ int) (reply int32)
func (*InodeMgr) PrefetchChunkThread ¶
func (n *InodeMgr) PrefetchChunkThread(h MetaRWHandler, key string, offset int64)
func (*InodeMgr) PrepareCreateMeta ¶
func (n *InodeMgr) PrepareCreateMeta(inodeKey InodeKeyType, parent MetaAttributes, 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 (n *InodeMgr) PreparePersistDeleteMeta(inodeKey InodeKeyType, key string, dirtyMgr *DirtyMgr) (*Meta, *WorkingMeta, int32)
func (*InodeMgr) PreparePersistMeta ¶
func (n *InodeMgr) PreparePersistMeta(inodeKey InodeKeyType, dirtyMgr *DirtyMgr) (*Meta, []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) (*Meta, *WorkingMeta, func(*NodeServer), int32)
func (*InodeMgr) PrepareUpdateMetaKey ¶
func (n *InodeMgr) PrepareUpdateMetaKey(inodeKey InodeKeyType, oldKey string, parent MetaAttributes, chunkSize int64, expireMs int32) (*Meta, *WorkingMeta, func(*NodeServer), int32)
func (*InodeMgr) PutDirObject ¶
func (n *InodeMgr) PutDirObject(ret *common.TwoPCPersistRecordMsg, metaKeys []string, meta *WorkingMeta, _ int) (reply int32)
func (*InodeMgr) PutEmptyObject ¶
func (n *InodeMgr) PutEmptyObject(ret *common.TwoPCPersistRecordMsg, metaKeys []string, meta *WorkingMeta, _ int) (reply int32)
func (*InodeMgr) PutObject ¶
func (n *InodeMgr) PutObject(ret *common.TwoPCPersistRecordMsg, metaKeys []string, meta *WorkingMeta, priority int, selfGroup string, dirtyExpireInterval time.Duration) (reply int32)
func (*InodeMgr) QuickCommitDeleteChunk ¶
func (*InodeMgr) QuickCommitExpandChunk ¶
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) RestoreMetas ¶
func (n *InodeMgr) RestoreMetas(metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg)
func (*InodeMgr) ResumeNode ¶
func (n *InodeMgr) ResumeNode()
func (*InodeMgr) SetChunkNoLock ¶
func (n *InodeMgr) SetChunkNoLock(chunk *Chunk, h MetaRWHandler, key string) (*WorkingChunk, int32)
SetChunkNoLock: caller must hold chunk.lock.Lock()
func (*InodeMgr) SuspendNode ¶
func (n *InodeMgr) SuspendNode()
func (*InodeMgr) UnlockPersistMeta ¶
func (n *InodeMgr) UnlockPersistMeta(meta *Meta, inodeKey InodeKeyType)
func (*InodeMgr) UpdateMetaAttr ¶
func (n *InodeMgr) UpdateMetaAttr(attr MetaAttributes, 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, key string, 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) GetLeader ¶
func (o JoinMigrationOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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) GetLeader ¶
func (o LeaveMigrationOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type LinkMetaOp ¶
type LinkMetaOp struct {
// contains filtered or unexported fields
}
func NewLinkMetaOp ¶
func NewLinkMetaOp(txId TxId, inodeKey InodeKeyType, childName string, childAttr MetaAttributes) LinkMetaOp
func (LinkMetaOp) GetLeader ¶
func (o LinkMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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 LogFile ¶
type LogFile struct {
// contains filtered or unexported fields
}
func (*LogFile) AppendCommand ¶
func (f *LogFile) AppendCommand(cmd AppendEntryCommand) (logIndex uint64, reply int32)
func (*LogFile) AppendCommandAt ¶
func (f *LogFile) AppendCommandAt(logIndex uint64, cmd AppendEntryCommand) (reply int32)
func (*LogFile) CheckReset ¶
func (*LogFile) CreateNewFile ¶
func (*LogFile) GetCurrentLogLength ¶
func (*LogFile) LoadCommandAt ¶
func (f *LogFile) LoadCommandAt(logIndex uint64) (cmd AppendEntryCommand, reply int32)
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 Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
func (*Meta) AddWorkingMeta ¶
func (b *Meta) AddWorkingMeta(working *WorkingMeta)
func (*Meta) GetLatestWorkingMeta ¶
func (b *Meta) GetLatestWorkingMeta() *WorkingMeta
func (*Meta) GetWorkingMetaEqual ¶
func (b *Meta) GetWorkingMetaEqual(version uint32) *WorkingMeta
type MetaAttributes ¶
type MetaAttributes struct {
// contains filtered or unexported fields
}
func NewMetaAttributes ¶
func NewMetaAttributes(inodeKey InodeKeyType, mode uint32) MetaAttributes
func NewMetaAttributesFromMsg ¶
func NewMetaAttributesFromMsg(msg *common.CopiedMetaChildMsg) MetaAttributes
func (MetaAttributes) IsDir ¶
func (m MetaAttributes) IsDir() bool
type MetaRWHandler ¶
type MetaRWHandler struct {
// contains filtered or unexported fields
}
func NewMetaRWHandler ¶
func NewMetaRWHandler(inodeKey InodeKeyType, version uint32, size int64, chunkSize int64, mTime int64, mode uint32) MetaRWHandler
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 MpuAddOp ¶
type MpuAddOp struct {
// contains filtered or unexported fields
}
func NewMpuAddOp ¶
func (MpuAddOp) GetLeader ¶
func (o MpuAddOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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 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) Apply ¶
func (n *NodeServer) Apply(l *AppendEntryCommand) (reply int32)
func (*NodeServer) CallCoordinator ¶
func (n *NodeServer) CallCoordinator(fn CoordinatorOpBase) (ret CoordinatorRet, reply int32)
func (*NodeServer) CheckReset ¶
func (n *NodeServer) CheckReset() (ok bool)
func (*NodeServer) CommitRecord ¶
func (*NodeServer) CreateCoordinatorId ¶
func (n *NodeServer) CreateCoordinatorId() CoordinatorId
func (*NodeServer) CreateObject ¶
func (n *NodeServer) CreateObject(parentKey string, parentAttr MetaAttributes, name string, childAttr MetaAttributes) (meta *WorkingMeta, err error)
func (*NodeServer) DownloadChunkViaRemote ¶
func (n *NodeServer) DownloadChunkViaRemote(msg RpcMsg) (*common.DownloadChunkRet, []SlicedPageBuffer)
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) GetConfig ¶
func (n *NodeServer) GetConfig(context.Context, *api.Void) (*api.GetConfigRet, error)
func (*NodeServer) GetMetaFromClusterOrCOS ¶
func (n *NodeServer) GetMetaFromClusterOrCOS(inodeKey InodeKeyType, key string, parent MetaAttributes) (*WorkingMeta, error)
func (*NodeServer) GetMetaRpc ¶
func (n *NodeServer) GetMetaRpc(msg RpcMsg) *common.GetWorkingMetaRet
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 MetaAttributes, dstParentKey string, dstParentInodeId fuseops.InodeID, dstName string, childAttr MetaAttributes) (meta *WorkingMeta, err error)
func (*NodeServer) Init ¶
func (n *NodeServer) Init(back *ObjCacheBackend)
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(msg RpcMsg) *common.Ack
func (*NodeServer) ReadAheadChunk ¶
func (n *NodeServer) ReadAheadChunk(h MetaRWHandler, key string, offset int64, size int64)
func (n *NodeServer) ReadChunk(h MetaRWHandler, key string, offset int64, data []byte) (buf *PageBuffer, count int, err error) { if h.size == 0 { return nil, 0, nil } begin := time.Now() var nodeList *RaftNodeList var leader RaftNode for i := 0; i < n.flags.MaxRetry; i++ { l := n.raftGroup.GetNodeListLocal() if nodeList == nil || nodeList.version != l.version { var reply int32 leader, nodeList, reply = n.raftGroup.getChunkOwnerNodeLocal(h.inodeKey, offset, h.chunkSize) if reply != RaftReplyOk { log.Errorf("Failed: ReadChunk, getKeyOwnerNodeAny, inodeKey=%v, offset=%v, reply=%v", h.inodeKey, offset, reply) return nil, 0, ReplyToFuseErr(reply) } } var r RaftBasicReply if leader.nodeId == n.raft.selfId { if r = n.raftGroup.BeginRaftRead(n.raft, nodeList.version); r.reply == RaftReplyOk { buf, count, r.reply = n.inodeMgr.ReadChunk(h, key, offset, data) } } else { buf, count, r = n.readChunkRemote(leader, h, key, offset, data, len(data)) } if r.reply != RaftReplyOk { log.Infof("Failed: ReadChunk, attempt=%v, leader=%v, meta=%v, offset=%v, r=%v", i, leader, h, offset, r) if r.reply != RaftReplyOk { if newLeader, found := fixupRpcErr(n, leader, r); found { leader = newLeader } } if needRetry(r.reply) { continue } err = ReplyToFuseErr(r.reply) } else if i > 0 { n.raftGroup.UpdateLeader(leader) } break } endAll := time.Now() log.Debugf("Success: ReadChunk, local=%v, inode=%v, key=%v, offset=%v, count=%v, elapsed=%v", leader.nodeId == n.raft.selfId, h.inodeKey, key, offset, count, endAll.Sub(begin)) return }
func (*NodeServer) Rejuvenate ¶
func (*NodeServer) RemoveInodeMetadataKey ¶
func (n *NodeServer) RemoveInodeMetadataKey(_ fuseops.InodeID, _ string) error
func (*NodeServer) RenameObject ¶
func (n *NodeServer) RenameObject(srcParentKey string, srcParent MetaAttributes, dstParentKey string, dstParentId fuseops.InodeID, srcName string, dstName string, childAttr MetaAttributes) (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) RestoreDirtyChunksTopHalf ¶
func (n *NodeServer) RestoreDirtyChunksTopHalf(msg RpcMsg, dataLength uint32, fd int, pipeFds [2]int, state *ReadRpcMsgState) (m proto.Message, fileId FileIdType, fileOffset int64, r RaftBasicReply)
func (*NodeServer) ResumeCoordinatorCommit ¶
func (n *NodeServer) ResumeCoordinatorCommit()
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) SpliceChunk ¶
func (n *NodeServer) SpliceChunk(fd int, pipeFds [2]int, state *ReadRpcMsgState, inodeKey InodeKeyType, dataLength uint32, offset int64, chunkSize int64) (fileId FileIdType, fileOffset int64, reply int32)
func (*NodeServer) StartGrpcServer ¶
func (n *NodeServer) StartGrpcServer()
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) UnlinkObject ¶
func (n *NodeServer) UnlinkObject(parentFullPath string, parentId fuseops.InodeID, name string, childKey InodeKeyType) (err error)
func (*NodeServer) UpdateChunkTopHalf ¶
func (n *NodeServer) UpdateChunkTopHalf(msg RpcMsg, dataLength uint32, fd int, pipeFds [2]int, state *ReadRpcMsgState) (m proto.Message, fileId FileIdType, fileOffset int64, r RaftBasicReply)
func (*NodeServer) UpdateNodeListAsClient ¶
func (n *NodeServer) UpdateNodeListAsClient() error
func (*NodeServer) UpdateObjectAttr ¶
func (n *NodeServer) UpdateObjectAttr(attr MetaAttributes, ts int64) (meta *WorkingMeta, err error)
func (*NodeServer) VectorReadChunk ¶
func (n *NodeServer) VectorReadChunk(h MetaRWHandler, key string, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
func (*NodeServer) VectorReadFastPath ¶
func (n *NodeServer) VectorReadFastPath(h MetaRWHandler, key string, offset int64, size int, blocking bool) (bufs []SlicedPageBuffer, count int, err error)
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) (mfs *fuse.MountedFileSystem, 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() error
func (*ObjcacheFileSystem) SetInodeAttributes ¶
func (fs *ObjcacheFileSystem) SetInodeAttributes(_ context.Context, op *fuseops.SetInodeAttributesOp) (err error)
func (*ObjcacheFileSystem) SetRoot ¶
func (fs *ObjcacheFileSystem) SetRoot()
func (*ObjcacheFileSystem) SetXattr ¶
func (fs *ObjcacheFileSystem) SetXattr(_ context.Context, op *fuseops.SetXattrOp) (err error)
func (*ObjcacheFileSystem) Shutdown ¶
func (fs *ObjcacheFileSystem) Shutdown()
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 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 { GetLeader(*NodeServer, *RaftNodeList) (RaftNode, bool) // contains filtered or unexported methods }
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 RaftFiles ¶
type RaftFiles struct {
// contains filtered or unexported fields
}
func NewRaftFileCache ¶
func (*RaftFiles) AddDiskUsage ¶
func (*RaftFiles) CheckReset ¶
func (*RaftFiles) DontNeed ¶
func (c *RaftFiles) DontNeed(fileId FileIdType)
func (*RaftFiles) GetDiskUsage ¶
func (*RaftFiles) GetFileLength ¶
func (c *RaftFiles) GetFileLength(fileId FileIdType) int64
func (*RaftFiles) GetFileName ¶
func (c *RaftFiles) GetFileName(fileId FileIdType) string
func (*RaftFiles) OpenAndReadCache ¶
func (*RaftFiles) OpenAndWriteCache ¶
func (*RaftFiles) ReserveRange ¶
func (c *RaftFiles) ReserveRange(fileId FileIdType, dataLen int64) (offset int64)
func (*RaftFiles) SeekRange ¶
func (c *RaftFiles) SeekRange(fileId FileIdType, newNextOffset int64)
type RaftGroupMgr ¶
type RaftGroupMgr struct {
// contains filtered or unexported fields
}
func NewRaftGroupMgr ¶
func NewRaftGroupMgr(groupId string, nrVirt int) *RaftGroupMgr
func NewRaftGroupMgrFromMsg ¶
func NewRaftGroupMgrFromMsg(groupId string, nrVirt int, msg *common.RaftGroupMgrSnapshotMsg) *RaftGroupMgr
func (*RaftGroupMgr) Add ¶
func (m *RaftGroupMgr) Add(msg *common.NodeMsg)
func (*RaftGroupMgr) ApplyAsUpdateNodeListLocal ¶
func (m *RaftGroupMgr) ApplyAsUpdateNodeListLocal(extBuf []byte) int32
ApplyAsUpdateNodeListLocal this appends a new server with a group (the group can be duplicated in the existing entry)
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) 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) SetNodeListDirect ¶
func (m *RaftGroupMgr) SetNodeListDirect(nodes []*api.ApiNodeMsg, nodeListVer uint64)
func (*RaftGroupMgr) UpdateLeader ¶
func (m *RaftGroupMgr) UpdateLeader(newLeader RaftNode) bool
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(cmd AppendEntryCommand) (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(extCmdId uint16, m proto.Message) int32
func (*RaftInstance) AppendInitEntry ¶
func (n *RaftInstance) AppendInitEntry(cmd AppendEntryCommand) int32
func (*RaftInstance) ApplyAll ¶
func (n *RaftInstance) ApplyAll(cmd *AppendEntryCommand, logIndex uint64) (currentLogLength uint64)
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) CleanExtFile ¶
func (n *RaftInstance) CleanExtFile()
func (*RaftInstance) GenerateCoordinatorId ¶
func (n *RaftInstance) GenerateCoordinatorId() CoordinatorId
func (*RaftInstance) GetExtFileId ¶
func (n *RaftInstance) GetExtFileId() FileIdType
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) (reply int32)
func (*RaftInstance) RequestVoteRpc ¶
func (n *RaftInstance) RequestVoteRpc(msg RpcMsg, sa common.NodeAddrInet4, fd int) bool
func (*RaftInstance) SetExt ¶
func (n *RaftInstance) SetExt(fileId uint64, 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) 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 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 RaftPersistState ¶
type RaftPersistState struct {
// contains filtered or unexported fields
}
func NewRaftPersistState ¶
func NewRaftPersistState(rootDir string, selfId uint32, stateName string) (*RaftPersistState, int32)
func (*RaftPersistState) CheckReset ¶
func (s *RaftPersistState) CheckReset() (ok bool)
func (*RaftPersistState) Clean ¶
func (s *RaftPersistState) Clean()
func (*RaftPersistState) Get ¶
func (s *RaftPersistState) Get() uint32
func (*RaftPersistState) Increment ¶
func (s *RaftPersistState) Increment() int32
func (*RaftPersistState) Reset ¶
func (s *RaftPersistState) Reset() int32
func (*RaftPersistState) Set ¶
func (s *RaftPersistState) Set(value uint32) int32
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(fileId FileIdType) (size int64)
func (*ReaderBufferCache) DropAll ¶
func (c *ReaderBufferCache) DropAll()
func (*ReaderBufferCache) EndFill ¶
func (c *ReaderBufferCache) EndFill(fileId FileIdType, offset int64)
func (*ReaderBufferCache) EndFillWithPut ¶
func (c *ReaderBufferCache) EndFillWithPut(reader *BufferedFilePageReader)
func (*ReaderBufferCache) GetCacheOrBeginFill ¶
func (c *ReaderBufferCache) GetCacheOrBeginFill(fileId FileIdType, offset int64) (reader *BufferedFilePageReader, beginFill bool)
func (*ReaderBufferCache) GetCacheWithFillWait ¶
func (c *ReaderBufferCache) GetCacheWithFillWait(fileId FileIdType, stagPart *StagingChunkPart, offset int64) *BufferedFilePageReader
func (*ReaderBufferCache) GetNewBufferedFilePageReader ¶
func (c *ReaderBufferCache) GetNewBufferedFilePageReader(fileId FileIdType, stag *StagingChunk, blocking bool) (*BufferedFilePageReader, error)
func (*ReaderBufferCache) ReleaseInFlightBuffer ¶
func (c *ReaderBufferCache) ReleaseInFlightBuffer(reader *BufferedFilePageReader)
func (*ReaderBufferCache) SetEvictable ¶
func (c *ReaderBufferCache) SetEvictable(reader *BufferedFilePageReader)
func (*ReaderBufferCache) TryBeginFill ¶
func (c *ReaderBufferCache) TryBeginFill(fileId FileIdType, offset int64) (beginFill 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 RenameBlobInput ¶
type RenameBlobOutput ¶
type RenameBlobOutput struct {
RequestId string
}
type RenameMetaOp ¶
type RenameMetaOp struct {
// contains filtered or unexported fields
}
func NewRenameMetaOp ¶
func NewRenameMetaOp(txId TxId, inodeKey InodeKeyType, srcName string, dstName string, childAttr MetaAttributes) RenameMetaOp
func (RenameMetaOp) GetLeader ¶
func (o RenameMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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) GetLeader ¶
func (o RestoreDirtyChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type RestoreDirtyMetaOp ¶
type RestoreDirtyMetaOp struct {
// contains filtered or unexported fields
}
func NewRestoreDirtyMetaOp ¶
func NewRestoreDirtyMetaOp(migrationId MigrationId, metas []*common.CopiedMetaMsg, files []*common.InodeToFileMsg, dirMetas []*common.CopiedMetaMsg, dirFiles []*common.InodeToFileMsg, target RaftNode) RestoreDirtyMetaOp
func (RestoreDirtyMetaOp) GetLeader ¶
func (o RestoreDirtyMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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 (*RpcClient) UnicastRpcMsg ¶
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, files *RaftFiles, dataBuf [][]byte, rpcArgs *RpcSeqNumArgs) (reply int32)
func (*RpcClientConnectionV2) CallObjcacheRpc ¶
func (*RpcClientConnectionV2) CallObjcacheRpcNoTimeout ¶
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 (*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, files *RaftFiles, 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, files *RaftFiles, 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) CallAny ¶
func (o *RpcMgr) CallAny(fn ParticipantOp, txId TxId, remoteTimeout time.Duration) (ret RpcRet, r RaftBasicReply)
func (*RpcMgr) CallCoordinatorMetaInRPC ¶
func (o *RpcMgr) CallCoordinatorMetaInRPC(fn CoordinatorOpBase, id CoordinatorId, nodeListVer uint64) (CoordinatorRet, RaftBasicReply)
func (*RpcMgr) CallCoordinatorUpdateNodeListInRPC ¶
func (o *RpcMgr) CallCoordinatorUpdateNodeListInRPC(fn CoordinatorUpdateNodeListOp, id CoordinatorId, nodeListVer uint64) (*common.MembershipListMsg, RaftBasicReply)
func (*RpcMgr) CallPrepareAny ¶
func (*RpcMgr) CallRemote ¶
func (o *RpcMgr) CallRemote(fn ParticipantOp, retryInterval time.Duration) bool
func (*RpcMgr) CallRpcAnyNoFail ¶
func (*RpcMgr) CheckReset ¶
func (*RpcMgr) CommitMigrationParticipant ¶
func (*RpcMgr) CoordinatorCreateObject ¶
func (o *RpcMgr) CoordinatorCreateObject(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorDeleteObject ¶
func (o *RpcMgr) CoordinatorDeleteObject(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorDeletePersist ¶
func (o *RpcMgr) CoordinatorDeletePersist(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorFlushObject ¶
func (o *RpcMgr) CoordinatorFlushObject(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorHardLinkObject ¶
func (o *RpcMgr) CoordinatorHardLinkObject(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorPersist ¶
func (o *RpcMgr) CoordinatorPersist(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorRenameObject ¶
func (o *RpcMgr) CoordinatorRenameObject(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorTruncateObject ¶
func (o *RpcMgr) CoordinatorTruncateObject(msg RpcMsg) *common.CoordinatorRetMsg
func (*RpcMgr) CoordinatorUpdateNodeList ¶
func (*RpcMgr) DeleteAndUnlockLocalAll ¶
func (*RpcMgr) DeleteMeta ¶
func (o *RpcMgr) DeleteMeta(msg RpcMsg) *common.MetaTxWithPrevMsg
func (*RpcMgr) ExecCommitAbort ¶
func (o *RpcMgr) ExecCommitAbort(fn ParticipantOp, seq TxId, nodeListVer uint64) (RpcRet, RaftBasicReply)
func (*RpcMgr) ExecPrepare ¶
func (o *RpcMgr) ExecPrepare(fn ParticipantOp, seq TxId, nodeListVer uint64) (RpcRet, RaftBasicReply)
func (*RpcMgr) GetApiPort ¶
func (o *RpcMgr) GetApiPort(msg RpcMsg) *common.GetApiPortRet
func (*RpcMgr) InitNodeList ¶
func (o *RpcMgr) InitNodeList(msg RpcMsg) *common.UpdateNodeListRet
func (*RpcMgr) RestoreDirtyChunksBottomHalf ¶
func (o *RpcMgr) RestoreDirtyChunksBottomHalf(m proto.Message, fileId FileIdType, fileOffset int64, dataLength uint32, r RaftBasicReply) *common.Ack
func (*RpcMgr) TruncateMeta ¶
func (o *RpcMgr) TruncateMeta(msg RpcMsg) *common.MetaTxWithPrevMsg
func (*RpcMgr) UnlinkMeta ¶
func (o *RpcMgr) UnlinkMeta(msg RpcMsg) *common.RenameRetMsg
func (*RpcMgr) UpdateChunkBottomHalf ¶
func (o *RpcMgr) UpdateChunkBottomHalf(m proto.Message, fileId FileIdType, fileOffset int64, dataLength uint32, r RaftBasicReply) *common.UpdateChunkRet
func (*RpcMgr) UpdateMetaSize ¶
func (o *RpcMgr) UpdateMetaSize(msg RpcMsg) *common.MetaTxWithPrevMsg
func (*RpcMgr) UpdateNodeList ¶
func (o *RpcMgr) UpdateNodeList(msg RpcMsg) *common.UpdateNodeListRet
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) SetTotalFileLength ¶
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, files *RaftFiles, 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 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 StagingChunk ¶
type StagingChunk struct {
// contains filtered or unexported fields
}
func NewStagingChunk ¶
func (*StagingChunk) AppendToLog ¶
func (s *StagingChunk) AppendToLog(inodeMgr *InodeMgr, reader *BufferedFilePageReader, fetchKey string) (err error)
func (*StagingChunk) GetObject ¶
func (s *StagingChunk) GetObject(inodeMgr *InodeMgr, reader *BufferedFilePageReader, fetchOffset int64) error
func (*StagingChunk) ReadObject ¶
func (s *StagingChunk) ReadObject(inodeMgr *InodeMgr, reader *BufferedFilePageReader) (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 TruncateMetaOp ¶
type TruncateMetaOp struct {
// contains filtered or unexported fields
}
func NewTruncateMetaOp ¶
func NewTruncateMetaOp(txId TxId, inodeKey InodeKeyType, newSize int64) TruncateMetaOp
func (TruncateMetaOp) GetLeader ¶
func (o TruncateMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type TwoPCCommitRecord ¶
type TwoPCCommitRecord struct {
// contains filtered or unexported fields
}
func NewTwoPCCommitRecordFromMsg ¶
func NewTwoPCCommitRecordFromMsg(l *common.TwoPCCommitRecordMsg) *TwoPCCommitRecord
func NewTwoPCUpdateCommitLog ¶
func NewTwoPCUpdateCommitLog(n *NodeServer, txId TxId, pOp RpcRet, chunks []*common.UpdateChunkRecordMsg, txType int) *TwoPCCommitRecord
func (*TwoPCCommitRecord) CommitCoordinator ¶
func (o *TwoPCCommitRecord) CommitCoordinator(n *NodeServer, retryInterval time.Duration) (reply int32)
func (*TwoPCCommitRecord) CommitRemote ¶
func (o *TwoPCCommitRecord) CommitRemote(n *NodeServer, retryInterval time.Duration)
func (*TwoPCCommitRecord) CountRemote ¶
func (o *TwoPCCommitRecord) CountRemote(raftGroup *RaftGroupMgr) (r int)
type TxMgr ¶
type TxMgr struct {
// contains filtered or unexported fields
}
func (*TxMgr) ApplyAsAbortTx ¶
func (*TxMgr) ApplyAsBeginPersist ¶
func (*TxMgr) ApplyAsCommitMigration ¶
func (*TxMgr) ApplyAsCommitTx ¶
func (*TxMgr) ApplyAsCreateMeta ¶
func (*TxMgr) ApplyAsCreateMetaCoordinator ¶
func (*TxMgr) ApplyAsDeleteMeta ¶
func (*TxMgr) ApplyAsDeleteMetaCoordinator ¶
func (*TxMgr) ApplyAsPersist ¶
func (*TxMgr) ApplyAsRenameCoordinator ¶
func (*TxMgr) ApplyAsUpdateMeta ¶
func (*TxMgr) ApplyAsUpdateMetaCoordinator ¶
func (*TxMgr) ApplyAsUpdateMetaKey ¶
func (*TxMgr) ApplyAsUpdateNodeList ¶
func (*TxMgr) ApplyAsUpdateNodeListCoordinator ¶
func (*TxMgr) ApplyAsUpdateParentMeta ¶
type UnlinkMetaOp ¶
type UnlinkMetaOp struct {
// contains filtered or unexported fields
}
func NewUnlinkMetaOp ¶
func NewUnlinkMetaOp(txId TxId, inodeKey InodeKeyType, childName string) UnlinkMetaOp
func (UnlinkMetaOp) GetLeader ¶
func (o UnlinkMetaOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, 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) GetLeader ¶
func (o UpdateChunkOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type UpdateMetaAttrOp ¶
type UpdateMetaAttrOp struct {
// contains filtered or unexported fields
}
func NewUpdateMetaAttrOp ¶
func NewUpdateMetaAttrOp(txId TxId, attr MetaAttributes, ts int64) UpdateMetaAttrOp
func (UpdateMetaAttrOp) GetLeader ¶
func (o UpdateMetaAttrOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
type UpdateMetaKeyOp ¶
type UpdateMetaKeyOp struct {
// contains filtered or unexported fields
}
func NewUpdateMetaKeyOp ¶
func NewUpdateMetaKeyOp(txId TxId, inodeKey InodeKeyType, oldKey string, newKey string, parent MetaAttributes) UpdateMetaKeyOp
func (UpdateMetaKeyOp) GetLeader ¶
func (o UpdateMetaKeyOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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) GetLeader ¶
func (o UpdateMetaSizeOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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) GetLeader ¶
func (o UpdateNodeListOp) GetLeader(n *NodeServer, l *RaftNodeList) (RaftNode, bool)
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, parent MetaAttributes, chunkSize int64, expireMs int32, mode 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) IsDir ¶
func (m *WorkingMeta) IsDir() bool
type WriteRpcState ¶
type WriteRpcState struct {
// contains filtered or unexported fields
}