Skip to content

Commit

Permalink
apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Dec 16, 2022
1 parent c9d24c2 commit dea44f8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions datastore/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ type txn struct {

var _ Txn = (*txn)(nil)

// NOTE: rootstore temporarily set to any and should be changed when the rootstore is changed to
// support ds.TxnDatastore
// NewTxnFrom returns a new Txn from the rootstore.
func NewTxnFrom(ctx context.Context, rootstore ds.TxnDatastore, readonly bool) (Txn, error) {
// check if our datastore natively supports iterable transaction, transactions or batching
if iterableTxnStore, ok := rootstore.(iterable.IterableTxnDatastore); ok {
Expand Down
3 changes: 0 additions & 3 deletions db/fetcher/versioned.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ func (vf *VersionedFetcher) Start(ctx context.Context, txn datastore.Txn, spans
// create store
root := memory.NewDatastore(ctx)
vf.root = root
if err != nil {
return err
}

vf.store, err = datastore.NewTxnFrom(
ctx,
Expand Down
1 change: 1 addition & 0 deletions tests/integration/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ func init() {
badgerInMemory = true
// Testing against the file system is off by default
badgerFile = false
inMemoryStore = true
}

if DetectDbChanges {
Expand Down

0 comments on commit dea44f8

Please sign in to comment.