You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While adding documentation I stumbled upon the function totalSize in Admin.hs:
totalSize::MonadIOm=>Collection->ActionmInt
totalSize coll =do
x <- storageSize coll
xs <-mapM isize =<< getIndexes coll
return (foldl(+) x xs)
where
isize idx = at "storageSize"`liftM` collectionStats (coll `T.append`".$"`T.append` at "name" idx)
The function sums the storage size of a collection with the (separately computed) sizes of its indices. What is strange to me is that collectionStats is called on things that are not collections, but indices.
Why not just using the totalIndexSize function (defined just above totalSize) i.e. something like:
It definitely looks suspicious. However since this is part of public API I would refrain from modifying this method's behavior even though it seems broken.
While adding documentation I stumbled upon the function
totalSize
inAdmin.hs
:The function sums the storage size of a collection with the (separately computed) sizes of its indices. What is strange to me is that
collectionStats
is called on things that are not collections, but indices.Why not just using the
totalIndexSize
function (defined just abovetotalSize
) i.e. something like:The text was updated successfully, but these errors were encountered: