File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use crate::spec::{
2323} ;
2424use crate :: { Error , ErrorKind , Result } ;
2525
26- const DEFAULT_CACHE_SIZE_BYTES : u64 = 2 ^ 15 ; // 32MB
26+ const DEFAULT_CACHE_SIZE_BYTES : u64 = 32 * 1024 * 1024 ; // 32MB
2727
2828#[ derive( Clone , Debug ) ]
2929pub ( crate ) enum CachedItem {
@@ -49,12 +49,12 @@ impl ObjectCache {
4949 /// Creates a new [`ObjectCache`]
5050 /// with the default cache size
5151 pub ( crate ) fn new ( file_io : FileIO ) -> Self {
52- Self :: new_with_cache_size ( file_io, DEFAULT_CACHE_SIZE_BYTES )
52+ Self :: new_with_capacity ( file_io, DEFAULT_CACHE_SIZE_BYTES )
5353 }
5454
5555 /// Creates a new [`ObjectCache`]
5656 /// with a specific cache size
57- pub ( crate ) fn new_with_cache_size ( file_io : FileIO , cache_size_bytes : u64 ) -> Self {
57+ pub ( crate ) fn new_with_capacity ( file_io : FileIO , cache_size_bytes : u64 ) -> Self {
5858 if cache_size_bytes == 0 {
5959 Self :: with_disabled_cache ( file_io)
6060 } else {
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl Manifest {
9595 }
9696
9797 /// Consume this Manifest, returning its constituent parts
98- pub fn consume ( self ) -> ( Vec < ManifestEntryRef > , ManifestMetadata ) {
98+ pub fn into_parts ( self ) -> ( Vec < ManifestEntryRef > , ManifestMetadata ) {
9999 let Self { entries, metadata } = self ;
100100 ( entries, metadata)
101101 }
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ impl TableBuilder {
130130 let object_cache = if disable_cache {
131131 Arc :: new ( ObjectCache :: with_disabled_cache ( file_io. clone ( ) ) )
132132 } else if let Some ( cache_size_bytes) = cache_size_bytes {
133- Arc :: new ( ObjectCache :: new_with_cache_size (
133+ Arc :: new ( ObjectCache :: new_with_capacity (
134134 file_io. clone ( ) ,
135135 cache_size_bytes,
136136 ) )
You can’t perform that action at this time.
0 commit comments