Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Address review on the (CAR + DAGStore) work #577

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions dagstore/dagstorewrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ func (ds *dagStoreWrapper) LoadShard(ctx context.Context, pieceCid cid.Cid) (car
}

// if the DAGStore does not know about the Shard -> register it and then try to acquire it again.
log.Infow("ErrShardUnknown during LoadShard, will re-register", "pieceCID", pieceCid)
log.Warnw("failed to load shard as shard is not registered, will re-register", "pieceCID", pieceCid)
if err := RegisterShardSync(ctx, ds, pieceCid, "", false); err != nil {
return nil, xerrors.Errorf("failed to re-register shard during loading piece CID %s: %w", pieceCid, err)
}
log.Infow("Successfully re-registered Shard in LoadShard", "pieceCID", pieceCid)
log.Warnw("successfully re-registered shard", "pieceCID", pieceCid)

resch = make(chan dagstore.ShardResult, 1)
if err := ds.dagStore.AcquireShard(ctx, key, resch, dagstore.AcquireOpts{}); err != nil {
Expand Down
16 changes: 8 additions & 8 deletions filestorecaradapter/internal/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ func (a *bsToDSBatchingAdapter) Batch() (datastore.Batch, error) {
return datastore.NewBasicBatch(a), nil
}

func (a *bsToDSBatchingAdapter) GetSize(key datastore.Key) (size int, err error) {
panic("implement me")
func (a *bsToDSBatchingAdapter) GetSize(_ datastore.Key) (size int, err error) {
return 0, xerrors.New("operation NOT supported: GetSize")
}

func (a *bsToDSBatchingAdapter) Query(q query.Query) (query.Results, error) {
panic("implement me")
func (a *bsToDSBatchingAdapter) Query(_ query.Query) (query.Results, error) {
return nil, xerrors.New("operation NOT supported: Query")
}

func (a *bsToDSBatchingAdapter) Delete(key datastore.Key) error {
panic("implement me")
func (a *bsToDSBatchingAdapter) Delete(_ datastore.Key) error {
return xerrors.New("operation NOT supported: Delete")
}

func (a *bsToDSBatchingAdapter) Sync(prefix datastore.Key) error {
panic("implement me")
func (a *bsToDSBatchingAdapter) Sync(_ datastore.Key) error {
return xerrors.New("operation NOT supported: Sync")
}

func (a *bsToDSBatchingAdapter) Close() error {
Expand Down