Github user eiri commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/210#discussion_r86540764
  
    --- Diff: src/couch_file.erl ---
    @@ -625,10 +627,12 @@ read_raw_iolist_int(#file{fd = Fd, pread_limit = 
Limit} = F, Pos, Len) ->
         case Pos + TotalBytes of
         Size when Size > F#file.eof + ?READ_AHEAD ->
             couch_stats:increment_counter([pread, exceed_eof]),
    -        throw(read_beyond_eof);
    +        {_Fd, Filepath} = get(couch_file_fd),
    +        throw({read_beyond_eof, Filepath});
    --- End diff --
    
    Yes and I think it's better this way.
    
    Theoretically moving `get(couch_file_fd)` out of the `case` would allow not 
to call it in each clause, making it DRY'er and all of that, but I don't feel 
too strongly about it, feel free to keep it as it is.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to