mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 17:54:37 +08:00
ensure memory is aligned
fix https://github.com/seaweedfs/seaweedfs/issues/3427
This commit is contained in:
@@ -12,6 +12,8 @@ import (
|
|||||||
type LogicChunkIndex int
|
type LogicChunkIndex int
|
||||||
|
|
||||||
type UploadPipeline struct {
|
type UploadPipeline struct {
|
||||||
|
uploaderCount int32
|
||||||
|
uploaderCountCond *sync.Cond
|
||||||
filepath util.FullPath
|
filepath util.FullPath
|
||||||
ChunkSize int64
|
ChunkSize int64
|
||||||
writableChunks map[LogicChunkIndex]PageChunk
|
writableChunks map[LogicChunkIndex]PageChunk
|
||||||
@@ -19,8 +21,6 @@ type UploadPipeline struct {
|
|||||||
sealedChunks map[LogicChunkIndex]*SealedChunk
|
sealedChunks map[LogicChunkIndex]*SealedChunk
|
||||||
sealedChunksLock sync.Mutex
|
sealedChunksLock sync.Mutex
|
||||||
uploaders *util.LimitedConcurrentExecutor
|
uploaders *util.LimitedConcurrentExecutor
|
||||||
uploaderCount int32
|
|
||||||
uploaderCountCond *sync.Cond
|
|
||||||
saveToStorageFn SaveToStorageFunc
|
saveToStorageFn SaveToStorageFunc
|
||||||
activeReadChunks map[LogicChunkIndex]int
|
activeReadChunks map[LogicChunkIndex]int
|
||||||
activeReadChunksLock sync.Mutex
|
activeReadChunksLock sync.Mutex
|
||||||
|
@@ -72,6 +72,9 @@ type FilerOption struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FilerServer struct {
|
type FilerServer struct {
|
||||||
|
inFlightDataSize int64
|
||||||
|
inFlightDataLimitCond *sync.Cond
|
||||||
|
|
||||||
filer_pb.UnimplementedSeaweedFilerServer
|
filer_pb.UnimplementedSeaweedFilerServer
|
||||||
option *FilerOption
|
option *FilerOption
|
||||||
secret security.SigningKey
|
secret security.SigningKey
|
||||||
@@ -90,9 +93,6 @@ type FilerServer struct {
|
|||||||
// track known metadata listeners
|
// track known metadata listeners
|
||||||
knownListenersLock sync.Mutex
|
knownListenersLock sync.Mutex
|
||||||
knownListeners map[int32]int32
|
knownListeners map[int32]int32
|
||||||
|
|
||||||
inFlightDataSize int64
|
|
||||||
inFlightDataLimitCond *sync.Cond
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) (fs *FilerServer, err error) {
|
func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) (fs *FilerServer, err error) {
|
||||||
|
@@ -50,10 +50,10 @@ func (c *LimitedConcurrentExecutor) Execute(job func()) {
|
|||||||
type OperationRequest func()
|
type OperationRequest func()
|
||||||
|
|
||||||
type LimitedOutOfOrderProcessor struct {
|
type LimitedOutOfOrderProcessor struct {
|
||||||
processorSlots uint32
|
|
||||||
processors []chan OperationRequest
|
|
||||||
processorLimit int32
|
processorLimit int32
|
||||||
processorLimitCond *sync.Cond
|
processorLimitCond *sync.Cond
|
||||||
|
processorSlots uint32
|
||||||
|
processors []chan OperationRequest
|
||||||
currentProcessor int32
|
currentProcessor int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user