Skip to content

Commit

Permalink
fix after test on 4 nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ackratos committed Feb 23, 2019
1 parent d5e08d5 commit 5a31f74
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/concurrent/async_local_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,22 +425,37 @@ func (app *asyncLocalClient) EndBlockSync(req types.RequestEndBlock) (*types.Res
//-------------------------------------------------------

func (app *asyncLocalClient) LatestSnapshot() (height int64, numKeys []int64, err error) {
app.rwLock.RLock()
defer app.rwLock.RUnlock()

return app.Application.LatestSnapshot()
}

func (app *asyncLocalClient) ReadSnapshotChunk(height int64, startIndex, endIndex int64) (chunk [][]byte, err error) {
app.rwLock.RLock()
defer app.rwLock.RUnlock()

return app.Application.ReadSnapshotChunk(height, startIndex, endIndex)
}

func (app *asyncLocalClient) StartRecovery(height int64, numKeys []int64) error {
app.rwLock.Lock()
defer app.rwLock.Unlock()

return app.Application.StartRecovery(height, numKeys)
}

func (app *asyncLocalClient) WriteRecoveryChunk(chunk [][]byte) error {
app.rwLock.Lock()
defer app.rwLock.Unlock()

return app.Application.WriteRecoveryChunk(chunk)
}

func (app *asyncLocalClient) EndRecovery(height int64) error {
app.rwLock.Lock()
defer app.rwLock.Unlock()

return app.Application.EndRecovery(height)
}

Expand Down

0 comments on commit 5a31f74

Please sign in to comment.