diff --git a/datas/datastore.go b/datas/datastore.go index 6fb982f5a9..c4d788cde4 100644 --- a/datas/datastore.go +++ b/datas/datastore.go @@ -25,7 +25,6 @@ func newDataStoreInternal(cs chunks.ChunkStore, rt chunks.RootTracker, rc *rootC if (rootRef == ref.Ref{}) { roots = NewRootSet() } else { - // BUG 11: This reads the entire database into memory. Whoopsie. roots = RootSetFromVal(types.MustReadValue(rootRef, cs).(types.Set)) } return DataStore{ diff --git a/datas/root_cache.go b/datas/root_cache.go index b2338356e7..b0afe2c5ce 100644 --- a/datas/root_cache.go +++ b/datas/root_cache.go @@ -34,7 +34,6 @@ func (cache *rootCache) Update(rootsRef ref.Ref) { return } - // BUG 11: This is super-inefficient with eager ReadValue and no caching rootSet := RootSet{types.MustReadValue(rootsRef, cache.source).(types.Set)} rootSet.Iter(func(commit Root) (stop bool) { cache.updateFromCommit(commit) diff --git a/dataset/dataset.go b/dataset/dataset.go index d6689ae90b..111b8b1ea5 100644 --- a/dataset/dataset.go +++ b/dataset/dataset.go @@ -71,9 +71,7 @@ func (rt *datasetRootTracker) UpdateRoot(current, last ref.Ref) bool { return false } - // BUG 11: Sucks to have to read the dataset root here in order to commit. datasetRoot := types.MustReadValue(current, rt.rootStore) - rt.rootStore = mgmt.CommitDatasets(rt.rootStore, mgmt.SetDatasetRoot(mgmt.GetDatasets(rt.rootStore), rt.datasetID, datasetRoot)) return true }