Skip to content

Commit 92e0635

Browse files
committed
revert: use default size
1 parent 84b206f commit 92e0635

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/hb_store_lmdb.erl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
-include("include/hb.hrl").
3131

3232
%% Configuration constants with reasonable defaults
33-
-define(MAX_SIZE, 512 * 1024 * 1024 * 1024). % 16GB default database size
33+
-define(DEFAULT_SIZE, 16 * 1024 * 1024 * 1024). % 16GB default database size
3434
-define(CONNECT_TIMEOUT, 6000). % Timeout for server communication
3535
-define(DEFAULT_IDLE_FLUSH_TIME, 5). % Idle server time before auto-flush
3636
-define(DEFAULT_MAX_FLUSH_TIME, 50). % Maximum time between flushes
@@ -65,7 +65,7 @@ start(Opts = #{ <<"name">> := DataDir }) ->
6565
elmdb:env_open(
6666
DataDirPath,
6767
[
68-
{map_size, maps:get(<<"capacity">>, Opts, ?MAX_SIZE)},
68+
{map_size, maps:get(<<"capacity">>, Opts, ?DEFAULT_SIZE)},
6969
no_mem_init, NoSyncParam
7070
]
7171
),
@@ -723,7 +723,7 @@ group_test() ->
723723
StoreOpts = #{
724724
<<"store-module">> => ?MODULE,
725725
<<"name">> => <<"/tmp/store3">>,
726-
<<"capacity">> => ?MAX_SIZE
726+
<<"capacity">> => ?DEFAULT_SIZE
727727
},
728728
reset(StoreOpts),
729729
make_group(StoreOpts, <<"colors">>),
@@ -741,7 +741,7 @@ link_test() ->
741741
StoreOpts = #{
742742
<<"store-module">> => ?MODULE,
743743
<<"name">> => <<"/tmp/store3">>,
744-
<<"capacity">> => ?MAX_SIZE
744+
<<"capacity">> => ?DEFAULT_SIZE
745745
},
746746
reset(StoreOpts),
747747
write(StoreOpts, <<"foo/bar/baz">>, <<"Bam">>),
@@ -754,7 +754,7 @@ link_fragment_test() ->
754754
StoreOpts = #{
755755
<<"store-module">> => ?MODULE,
756756
<<"name">> => <<"/tmp/store3">>,
757-
<<"capacity">> => ?MAX_SIZE
757+
<<"capacity">> => ?DEFAULT_SIZE
758758
},
759759
reset(StoreOpts),
760760
write(StoreOpts, [<<"data">>, <<"bar">>, <<"baz">>], <<"Bam">>),
@@ -772,7 +772,7 @@ type_test() ->
772772
StoreOpts = #{
773773
<<"store-module">> => ?MODULE,
774774
<<"name">> => <<"/tmp/store-6">>,
775-
<<"capacity">> => ?MAX_SIZE
775+
<<"capacity">> => ?DEFAULT_SIZE
776776
},
777777
reset(StoreOpts),
778778
make_group(StoreOpts, <<"assets">>),
@@ -804,7 +804,7 @@ link_key_list_test() ->
804804
StoreOpts = #{
805805
<<"store-module">> => ?MODULE,
806806
<<"name">> => <<"/tmp/store-7">>,
807-
<<"capacity">> => ?MAX_SIZE
807+
<<"capacity">> => ?DEFAULT_SIZE
808808
},
809809
reset(StoreOpts),
810810
write(StoreOpts, [ <<"parent">>, <<"key">> ], <<"value">>),
@@ -827,7 +827,7 @@ path_traversal_link_test() ->
827827
StoreOpts = #{
828828
<<"store-module">> => ?MODULE,
829829
<<"name">> => <<"/tmp/store-8">>,
830-
<<"capacity">> => ?MAX_SIZE
830+
<<"capacity">> => ?DEFAULT_SIZE
831831
},
832832
reset(StoreOpts),
833833
% Create the actual data at group/key
@@ -845,7 +845,7 @@ exact_hb_store_test() ->
845845
StoreOpts = #{
846846
<<"store-module">> => ?MODULE,
847847
<<"name">> => <<"/tmp/store-exact">>,
848-
<<"capacity">> => ?MAX_SIZE
848+
<<"capacity">> => ?DEFAULT_SIZE
849849
},
850850
% Follow exact same pattern as hb_store test
851851
?event(step1_make_group),
@@ -877,7 +877,7 @@ cache_style_test() ->
877877
StoreOpts = #{
878878
<<"store-module">> => ?MODULE,
879879
<<"name">> => <<"/tmp/store-cache-style">>,
880-
<<"capacity">> => ?MAX_SIZE
880+
<<"capacity">> => ?DEFAULT_SIZE
881881
},
882882
reset(StoreOpts),
883883
% Start the store
@@ -900,7 +900,7 @@ nested_map_cache_test() ->
900900
StoreOpts = #{
901901
<<"store-module">> => ?MODULE,
902902
<<"name">> => <<"/tmp/store-nested-cache">>,
903-
<<"capacity">> => ?MAX_SIZE
903+
<<"capacity">> => ?DEFAULT_SIZE
904904
},
905905
% Clean up any previous test data
906906
reset(StoreOpts),

0 commit comments

Comments
 (0)