Skip to content

Commit 2baf368

Browse files
Allow query result cache to be disabled, and update documentation.
1 parent 3142f18 commit 2baf368

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ Options. For Options having any of the following names, a CharSequence value may
177177
- [oracle.net.disableOob](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK)
178178
- Out of band (oob) breaks effect statement timeouts. Set this to "true"
179179
if statement timeouts are not working correctly.
180+
- [oracle.jdbc.enableQueryResultCache](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html#CONNECTION_PROPERTY_ENABLE_QUERY_RESULT_CACHE)
181+
- Cached query results can cause phantom reads even if the serializable
182+
transaction isolation level is set. Set this to "false" if using the
183+
serializable isolation level.
180184
- Oracle Net Descriptors of the form ```(DESCRIPTION=...)``` may be specified as an io.r2dbc.spi.Option having the name `oracleNetDescriptor`.
181185
- If `oracleNetDescriptor` is specified, then it is invalid to specify any other options that might conflict with information in the descriptor, such as: `HOST`, `PORT`, `DATABASE`, and `SSL`.
182186
- The `oracleNetDescriptor` option may appear in the query section of an R2DBC URL: `r2dbc:oracle://?oracleNetDescriptor=(DESCRIPTION=...)`
@@ -207,8 +211,9 @@ signals demand, and does not support multiple subscribers.
207211
or Oracle JDBC Driver error message](https://docs.oracle.com/en/database/oracle/oracle-database/21/errmg/ORA-00000.html#GUID-27437B7F-F0C3-4F1F-9C6E-6780706FB0F6)
208212

209213
### Transactions
210-
- READ COMMITTED is the default transaction isolation level, and is the
211-
only level supported in this release.
214+
- READ COMMITTED is the default transaction isolation level
215+
- SERIALIZABLE is the only isolation level, besides READ COMMITED, that
216+
Oracle Database supports.
212217
- Transaction savepoints are not supported in this release.
213218
- TransactionDefinition.LOCK_WAIT_TIMEOUT is not supported in this release.
214219
- Oracle Database does not support a lock wait timeout that applies to all statements within a transaction.

src/main/java/oracle/r2dbc/impl/OracleReactiveJdbcAdapter.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,14 @@ final class OracleReactiveJdbcAdapter implements ReactiveJdbcAdapter {
206206
// OOB is not supported and automatically disable OOB. This automated
207207
// detection is not impleneted in 18.x.
208208
Option.valueOf(
209-
OracleConnection.CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK)
209+
OracleConnection
210+
.CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK),
210211

212+
// Allow the client-side ResultSet cache to be disabled. It is
213+
// necessary to do so when using the serializable transaction isolation
214+
// level in order to prevent phantom reads.
215+
Option.valueOf(
216+
OracleConnection.CONNECTION_PROPERTY_ENABLE_QUERY_RESULT_CACHE)
211217
);
212218

213219
/**

0 commit comments

Comments
 (0)