Skip to content

Commit

Permalink
fix network mode
Browse files Browse the repository at this point in the history
  • Loading branch information
poolpOrg committed Oct 16, 2023
1 parent 0d36bb1 commit 3acf166
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions storage/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,13 @@ func (repository *ClientRepository) PutMetadata(indexID uuid.UUID, data []byte)
}

func (repository *ClientRepository) PutBlob(checksum [32]byte, data []byte) error {
result, err := repository.sendRequest("ReqStorePutIndex", network.ReqStorePutBlob{
result, err := repository.sendRequest("ReqStorePutBlob", network.ReqStorePutBlob{
Checksum: checksum,
Data: data,
})
if err != nil {
return err
}

return result.Payload.(network.ResStorePutBlob).Err
}

Expand Down
3 changes: 3 additions & 0 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ func (repository *Repository) wLock() {
}
func (repository *Repository) wUnlock() {
<-repository.wChan
logger.Trace("storage", "wUnlock -> %d", len(repository.wChan))
// <-repository.maxParallelism
}

Expand All @@ -246,6 +247,7 @@ func (repository *Repository) rLock() {
}
func (repository *Repository) rUnlock() {
<-repository.rChan
logger.Trace("storage", "rUnlock -> %d", len(repository.rChan))
// <-repository.maxParallelism
}

Expand All @@ -260,6 +262,7 @@ func (repository *Repository) sLock() {
}
func (repository *Repository) sUnlock() {
<-repository.sChan
logger.Trace("storage", "sUnlock -> %d", len(repository.sChan))
// <-repository.maxParallelism
}

Expand Down

0 comments on commit 3acf166

Please sign in to comment.