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

Liberty 19.0.0.7 Blocks *all* Large Object API functions for Postgres #8346

Closed
sshivell opened this issue Jul 24, 2019 · 2 comments · Fixed by #8351
Closed

Liberty 19.0.0.7 Blocks *all* Large Object API functions for Postgres #8346

sshivell opened this issue Jul 24, 2019 · 2 comments · Fixed by #8351
Assignees
Labels

Comments

@sshivell
Copy link

The Postgres JDBC Driver allows for accessing the LargeObjectAPI calls to deal with storing large files with the oid type in Postgres.

As of Websphere Liberty 19.0.0.7 these apis have been blocked for use by Websphere.

Attempting to use them results in errors such as:

java.sql.SQLFeatureNotSupportedException: DSRA9130E: Operation is not permitted by the application server: getLargeObjectAPI
    at com.ibm.ws.rsadapter.jdbc.WSJdbcWrapper.invoke(WSJdbcWrapper.java:224)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.invoke(WSJdbcConnection.java:4124)
    at 

My understanding, based on conversations with devs and after seeing some Tests written in this issue: #8118 Is that the LargeObjectAPI with postgres can do things to the underlying Connection outside of WebSphere's Transaction manager. The end result is that some operation can result in data-integrity issues.

However, not all uses of the api are unsafe and some are safe. Asking that safe operations not be blocked. Specifically things like:
conn.largeObjectApi.createLO()
conn.largeObjectApi.open(int,int) which is

  public LargeObject open(long oid, int mode) throws SQLException {
    return open(oid, mode, false);
  }

LargeObject..getOutputStream()

@throws SQLException if a database-access error occurs.
   */
  public OutputStream getOutputStream() throws SQLException {
    if (os == null) {
      os = new BlobOutputStream(this, 4096);
    }
    return os;
  }
@aguibert aguibert self-assigned this Jul 24, 2019
@aguibert aguibert added in:JDBC/JCA release bug This bug is present in a released version of Open Liberty team:Zombie Apocalypse labels Jul 24, 2019
@aguibert
Copy link
Contributor

aguibert commented Jul 25, 2019

thanks for reporting this @sshivell. Originally I had blocked the entire LargeObjectAPI for 19.0.0.7 because some of the operations could manipulate the underlying connection which would go beyond Liberty's transaction manager tracking.

However, after revisiting this issue I've realized a way that Liberty can reflect/proxy the API call in such a way that the tx manager maintains tracking of the underlying connection in PR #8351. I expect this PR will be delivered soon which means the limitation will be lifted in the next release (19.0.0.8).

@aguibert
Copy link
Contributor

This regression was caused by #7294 and effects versions 19.0.0.5 - 19.0.0.7, and is fixed as of 19.0.0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants