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

Write timeout does not work for JDO update operations #495

Open
smatytsin opened this issue Aug 3, 2024 · 0 comments
Open

Write timeout does not work for JDO update operations #495

smatytsin opened this issue Aug 3, 2024 · 0 comments

Comments

@smatytsin
Copy link

smatytsin commented Aug 3, 2024

As described in documentation there are few settings to set Read/Write timeouts for DB Requests:
javax.jdo.option.DatastoreReadTimeoutMillis
javax.jdo.option.DatastoreWriteTimeoutMillis
datanucleus.datastoreWriteTimeout
datanucleus.datastoreReadTimeout

But WriteTimeout does not work if DB Request is inited by JDO update event.
When we update a state of JDO object, the executeUpdate request calls without any timeout set for PreparedStatement

Here is a callstack (for old 4.1.19 release but problem is also actual for newest releases):
... org.datanucleus.store.rdbms.ParamLoggingPreparedStatement.executeUpdate(ParamLoggingPreparedStatement.java:393) at org.datanucleus.store.rdbms.SQLController.executeStatementUpdate(SQLController.java:431) at org.datanucleus.store.rdbms.request.UpdateRequest.execute(UpdateRequest.java:395) at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.updateObjectInTable(RDBMSPersistenceHandler.java:409) at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.updateObject(RDBMSPersistenceHandler.java:383) at org.datanucleus.state.StateManagerImpl.flush(StateManagerImpl.java:4585) at org.datanucleus.flush.FlushOrdered.execute(FlushOrdered.java:106) at org.datanucleus.ExecutionContextImpl.flushInternal(ExecutionContextImpl.java:4055) at org.datanucleus.ExecutionContextThreadedImpl.flushInternal(ExecutionContextThreadedImpl.java:450) at org.datanucleus.ExecutionContextImpl.markDirty(ExecutionContextImpl.java:3811) at org.datanucleus.ExecutionContextThreadedImpl.markDirty(ExecutionContextThreadedImpl.java:422) at org.datanucleus.state.StateManagerImpl.postWriteField(StateManagerImpl.java:4374) at org.datanucleus.state.StateManagerImpl.replaceField(StateManagerImpl.java:3047) at org.datanucleus.state.StateManagerImpl.updateField(StateManagerImpl.java:1865) at org.datanucleus.state.StateManagerImpl.setStringField(StateManagerImpl.java:1615) at org.apache.hadoop.hive.metastore.model.MStorageDescriptor.dnSetlocation(MStorageDescriptor.java) ...

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

No branches or pull requests

2 participants