TryReadEncoded This function will read the encoded data from the local storage file. It also check whether the blob is empty or not synced, if they are these two cases, it will return err.
(kvIdx uint64, readLen int)
| 605 | // TryReadEncoded This function will read the encoded data from the local storage file. It also check whether the blob is empty or not synced, |
| 606 | // if they are these two cases, it will return err. |
| 607 | func (s *StorageManager) TryReadEncoded(kvIdx uint64, readLen int) ([]byte, bool, error) { |
| 608 | s.mu.Lock() |
| 609 | defer s.mu.Unlock() |
| 610 | |
| 611 | err := s.syncCheck(kvIdx) |
| 612 | if err != nil { |
| 613 | return nil, false, err |
| 614 | } |
| 615 | |
| 616 | return s.shardManager.TryReadEncoded(kvIdx, readLen) |
| 617 | } |
| 618 | |
| 619 | func (s *StorageManager) TryRead(kvIdx uint64, readLen int, commit common.Hash) ([]byte, bool, error) { |
| 620 | s.mu.Lock() |
nothing calls this directly
no test coverage detected