@@ -113,7 +113,7 @@ init_data_reader_at(ChunkId, FilePos, File,
113113 chunk_selector = all ,
114114 position = FilePos ,
115115 transport = maps :get (transport , Config , tcp )},
116- segment_io = { fd , Fd } }};
116+ segment_io = Fd }};
117117 Err ->
118118 Err
119119 end .
@@ -313,7 +313,7 @@ open_offset_reader_at(SegmentFile, NextChunkId, FilePos,
313313 next_offset = NextChunkId ,
314314 transport = maps :get (transport , Options , tcp ),
315315 filter = FilterMatcher },
316- segment_io = { fd , Fd } }}.
316+ segment_io = Fd }}.
317317
318318% % Searches the index files backwards for the ID of the last user chunk.
319319last_user_chunk_location (Name , RevdIdxFiles )
@@ -1277,7 +1277,7 @@ read_header0(#?LOGSTATE{cfg = #cfg{directory = Dir,
12771277 position = Pos ,
12781278 filter = Filter } = Read0 ,
12791279 current_file = CurFile ,
1280- segment_io = { fd , Fd } } =
1280+ segment_io = Fd } =
12811281 State ) ->
12821282 % % reads the next header if permitted
12831283 case can_read_next (State ) of
@@ -1373,7 +1373,7 @@ read_header0(#?LOGSTATE{cfg = #cfg{directory = Dir,
13731373 position = ? LOG_HEADER_SIZE },
13741374 read_header0 (
13751375 State #? LOGSTATE {current_file = SegFile ,
1376- segment_io = { fd , Fd2 } ,
1376+ segment_io = Fd2 ,
13771377 mode = Read });
13781378 {error , enoent } ->
13791379 {end_of_stream , State }
@@ -1442,7 +1442,7 @@ chunk_iterator(#?LOGSTATE{cfg = #cfg{},
14421442 filter_size := FilterSize ,
14431443 position := Pos ,
14441444 next_position := NextPos } = Header ,
1445- #? LOGSTATE {segment_io = { fd , Fd } , mode = # read {next_offset = ChId } = Read } = State1 } ->
1445+ #? LOGSTATE {segment_io = Fd , mode = # read {next_offset = ChId } = Read } = State1 } ->
14461446 State = State1 #? LOGSTATE {mode = Read # read {next_offset = ChId + NumRecords ,
14471447 position = NextPos }},
14481448 case needs_handling (RType , Selector , ChType ) of
@@ -1479,7 +1479,7 @@ read_chunk(#?LOGSTATE{cfg = #cfg{}} = State0) ->
14791479 position := Pos ,
14801480 next_position := NextPos ,
14811481 trailer_size := TrailerSize },
1482- #? LOGSTATE {segment_io = { fd , Fd } , mode = # read {next_offset = ChId } = Read } = State } ->
1482+ #? LOGSTATE {segment_io = Fd , mode = # read {next_offset = ChId } = Read } = State } ->
14831483 ToRead = ? HEADER_SIZE_B + FilterSize + DataSize + TrailerSize ,
14841484 {ok , ChData } = file :pread (Fd , Pos , ToRead ),
14851485 <<_ :? HEADER_SIZE_B /binary ,
@@ -1640,7 +1640,7 @@ send_file(Sock,
16401640 position := Pos ,
16411641 next_position := NextPos ,
16421642 header_data := HeaderData } = Header ,
1643- #? LOGSTATE {segment_io = { fd , Fd } ,
1643+ #? LOGSTATE {segment_io = Fd ,
16441644 mode = # read {next_offset = ChId } = Read0 } = State1 } ->
16451645 % % read header
16461646 % % used to write frame headers to socket
0 commit comments