This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch dead-code-cleanup
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 8725a9b7145d0b9ef4d83e852cd486439bea2ea4
Author: Nick Vatamaniuc <[email protected]>
AuthorDate: Thu May 19 18:08:03 2022 -0400

    Cleanup couch_file exports and unused code
    
    Removed:
     * append_binary_md5/2
     * assemble_file_chunk/1
     * append_term_md5/2
     * append_term_md5/3
     * pread_binaries/2
     * pread_iolists/2
     * append_binaries/2
---
 src/couch/src/couch_file.erl | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/src/couch/src/couch_file.erl b/src/couch/src/couch_file.erl
index 0e786525f..ba8d9c42f 100644
--- a/src/couch/src/couch_file.erl
+++ b/src/couch/src/couch_file.erl
@@ -39,11 +39,11 @@
 % public API
 -export([open/1, open/2, close/1, bytes/1, sync/1, truncate/2, set_db_pid/2]).
 -export([pread_term/2, pread_iolist/2, pread_binary/2]).
--export([append_binary/2, append_binary_md5/2]).
--export([append_raw_chunk/2, assemble_file_chunk/1, assemble_file_chunk/2]).
--export([append_term/2, append_term/3, append_term_md5/2, append_term_md5/3]).
--export([pread_terms/2, pread_binaries/2, pread_iolists/2]).
--export([append_terms/2, append_terms/3, append_binaries/2]).
+-export([append_binary/2]).
+-export([append_raw_chunk/2, assemble_file_chunk/2]).
+-export([append_term/2, append_term/3]).
+-export([pread_terms/2]).
+-export([append_terms/2, append_terms/3]).
 -export([write_header/2, read_header/1]).
 -export([delete/2, delete/3, nuke_dir/2, init_delete_dir/1]).
 -export([last_read/1]).
@@ -124,13 +124,6 @@ append_term(Fd, Term, Options) ->
     Comp = couch_util:get_value(compression, Options, ?DEFAULT_COMPRESSION),
     append_binary(Fd, couch_compress:compress(Term, Comp)).
 
-append_term_md5(Fd, Term) ->
-    append_term_md5(Fd, Term, []).
-
-append_term_md5(Fd, Term, Options) ->
-    Comp = couch_util:get_value(compression, Options, ?DEFAULT_COMPRESSION),
-    append_binary_md5(Fd, couch_compress:compress(Term, Comp)).
-
 %%----------------------------------------------------------------------
 %% Purpose: To append an Erlang binary to the end of the file.
 %% Args:    Erlang term to serialize and append to the file.
@@ -142,13 +135,6 @@ append_term_md5(Fd, Term, Options) ->
 append_binary(Fd, Bin) ->
     ioq:call(Fd, {append_bin, assemble_file_chunk(Bin)}, 
erlang:get(io_priority)).
 
-append_binary_md5(Fd, Bin) ->
-    ioq:call(
-        Fd,
-        {append_bin, assemble_file_chunk(Bin, couch_hash:md5_hash(Bin))},
-        erlang:get(io_priority)
-    ).
-
 append_raw_chunk(Fd, Chunk) ->
     ioq:call(Fd, {append_bin, Chunk}, erlang:get(io_priority)).
 

Reply via email to