Skip to content

Commit

Permalink
changed field order in BaseCommandHandler to achieve minimum memomory…
Browse files Browse the repository at this point in the history
… usage due to padding
  • Loading branch information
psrvere committed Dec 22, 2024
1 parent 48c21e7 commit 8fdb6b1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/commandhandler/commandhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,20 @@ type CommandHandler interface {

type BaseCommandHandler struct {
CommandHandler
id string
parser requestparser.Parser
id string
parser requestparser.Parser
wl wal.AbstractWAL

shardManager *shard.ShardManager
adhocReqChan chan *cmd.DiceDBCmd
Session *auth.Session
adhocReqChan chan *cmd.DiceDBCmd
globalErrorChan chan error
ioThreadReadChan chan []byte // Channel to receive data from io-thread
ioThreadWriteChan chan interface{} // Channel to send data to io-thread
ioThreadErrChan chan error // Channel to receive errors from io-thread
responseChan chan *ops.StoreResponse // Channel to communicate with shard
preprocessingChan chan *ops.StoreResponse // Channel to communicate with shard
cmdWatchSubscriptionChan chan watchmanager.WatchSubscription
wl wal.AbstractWAL
}

func NewCommandHandler(id string, responseChan, preprocessingChan chan *ops.StoreResponse,
Expand Down

0 comments on commit 8fdb6b1

Please sign in to comment.