Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlobInputStream improvements #3148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Commits on May 13, 2024

  1. fix: inconsistent behaviour of BlobInputStream.reset()

    A BlobInputStream will start reading from the current position of the LargeObject used to create it, but the current/marked position does not account for this.
    Initialising current position correctly will fix this.
    
    Closes pgjdbc#3149
    OrangeDog committed May 13, 2024
    Configuration menu
    Copy the full SHA
    2447cc9 View commit details
    Browse the repository at this point in the history
  2. feat: implement efficient skipping in BlobInputStream

    Using seek is more efficient than reading and discarding the bytes.
    The only behavioural change is it now allows skipping past the natural end of the stream, but the method contract already allows for this. It should not break anything.
    
    Closes pgjdbc#3144
    OrangeDog committed May 13, 2024
    Configuration menu
    Copy the full SHA
    b044578 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. feat: do not attempt to guard server-side large object limit

    BlobInputStream.seek will now throw if attempting to skip beyond the max size for a large object. This is a breaking change. The previous implementation was imperfect as it did not account for the server being compiled with a different limit.
    
    The state of the stream after the exception is undefined, but hopefully sane. Further exceptions may be thrown on future operations.
    OrangeDog committed May 14, 2024
    Configuration menu
    Copy the full SHA
    22ee412 View commit details
    Browse the repository at this point in the history