aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/disk_log_SUITE.erl
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2016-11-01 15:36:57 +0100
committerRichard Carlsson <[email protected]>2016-11-29 10:31:43 +0100
commiteda5c4859f561fae7d3a3b74f19dd8596c212966 (patch)
treec957eb3248ceb4618fe062af90d28201faf58a48 /lib/kernel/test/disk_log_SUITE.erl
parent5a8a1a963edd6d6dbb35bf615a4bad7d77041443 (diff)
downloadotp-eda5c4859f561fae7d3a3b74f19dd8596c212966.tar.gz
otp-eda5c4859f561fae7d3a3b74f19dd8596c212966.tar.bz2
otp-eda5c4859f561fae7d3a3b74f19dd8596c212966.zip
Improve caching in disk_log
Avoid starting timers for flushing when the written data is empty or larger than the max cache size. Previously, a single huge write to an empty cache would be put in the cache until the next write or the timer event. Also increase the cache size from 16K to 64K.
Diffstat (limited to 'lib/kernel/test/disk_log_SUITE.erl')
-rw-r--r--lib/kernel/test/disk_log_SUITE.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel/test/disk_log_SUITE.erl b/lib/kernel/test/disk_log_SUITE.erl
index a25b315d9d..23fe975ef7 100644
--- a/lib/kernel/test/disk_log_SUITE.erl
+++ b/lib/kernel/test/disk_log_SUITE.erl
@@ -4666,7 +4666,7 @@ other_groups(Conf) when is_list(Conf) ->
ok.
--define(MAX, 16384). % MAX in disk_log_1.erl
+-define(MAX, ?MAX_FWRITE_CACHE). % as in disk_log_1.erl
%% Evil cases such as closed file descriptor port.
evil(Conf) when is_list(Conf) ->
Dir = ?privdir(Conf),
@@ -4690,7 +4690,7 @@ evil(Conf) when is_list(Conf) ->
{size,?MAX+50},{format,external}]),
[Fd] = erlang:ports() -- Ports0,
{B,_} = x_mk_bytes(30),
- ok = disk_log:blog(Log, <<0:(?MAX+1)/unit:8>>),
+ ok = disk_log:blog(Log, <<0:(?MAX-1)/unit:8>>),
exit(Fd, kill),
{error, {file_error,_,einval}} = disk_log:blog_terms(Log, [B,B]),
ok= disk_log:close(Log),