Skip to content

Commit

Permalink
Feature db opt (#174)
Browse files Browse the repository at this point in the history
* db

* db

* db

Co-authored-by: charizer <>
  • Loading branch information
charizer authored Sep 1, 2021
1 parent 8d5e6a9 commit 16b86ea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion syncserver/api/lruInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (ReqPutLRURoom) Process(consumer interface{}, msg core.Coder, device *autht
}

c.rmHsTimeline.LoadHistory(req.RoomID, false)
//c.rmHsTimeline.LoadDomainMaxStream(req.RoomID)
c.rmHsTimeline.LoadDomainMaxStream(req.RoomID)
c.rmHsTimeline.LoadRoomMinStream(req.RoomID)
c.rsTimeline.LoadStreamStates(req.RoomID, false)
c.rsTimeline.LoadStates(req.RoomID, false)
Expand Down
2 changes: 1 addition & 1 deletion syncserver/syncserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func SetupSyncServerComponent(
roomHistory.SetMonitor(qureyHitCounter)
roomHistory.SetCache(cacheIn)
roomHistory.SetCfg(base.Cfg)
roomHistory.LoadAllDomainMaxStream(context.Background())
//roomHistory.LoadAllDomainMaxStream(context.Background())
rsCurState.SetPersist(syncDB)

rsTimeline.SetPersist(syncDB)
Expand Down
2 changes: 1 addition & 1 deletion syncwriter/api/lruInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (ReqPutLRURoom) Process(consumer interface{}, msg core.Coder, device *autht
}

c.rmHsTimeline.LoadHistory(req.RoomID, false)
//c.rmHsTimeline.LoadDomainMaxStream(req.RoomID)
c.rmHsTimeline.LoadDomainMaxStream(req.RoomID)
c.rsTimeline.LoadStreamStates(req.RoomID, false)

return http.StatusOK, &external.PutLRURoomResponse{
Expand Down
3 changes: 1 addition & 2 deletions syncwriter/syncwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package syncwriter

import (
"context"
"github.com/finogeeks/ligase/common/basecomponent"
"github.com/finogeeks/ligase/model/repos"
rpcService "github.com/finogeeks/ligase/rpc"
Expand Down Expand Up @@ -45,7 +44,7 @@ func SetupSyncWriterComponent(
roomHistory.SetRoomPersist(roomDB)
roomHistory.SetPersist(syncDB)
roomHistory.SetMonitor(qureyHitCounter)
roomHistory.LoadAllDomainMaxStream(context.Background())
//roomHistory.LoadAllDomainMaxStream(context.Background())
roomHistory.SetCache(cache)
rsCurState.SetPersist(syncDB)

Expand Down

0 comments on commit 16b86ea

Please sign in to comment.