File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
main/java/oracle/r2dbc/impl
test/java/oracle/r2dbc/impl Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -648,15 +648,13 @@ private static void configureJdbcDefaults(OracleDataSource oracleDataSource) {
648
648
setPropertyIfAbsent (oracleDataSource ,
649
649
OracleConnection .CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE , "25" );
650
650
651
- // Prefetch LOB values by default. The database's maximum supported
652
- // prefetch size, 1GB, is configured by default. This is done so that
653
- // Row.get(...) can map LOB values into ByteBuffer/String without a
654
- // blocking database call. If the entire value is prefetched, then JDBC
655
- // won't need to fetch the remainder from the database when the entire is
656
- // value requested as a ByteBuffer or String.
651
+ // Prefetch LOB values by default. This allows Row.get(...) to map most LOB
652
+ // values into ByteBuffer/String without a blocking database call to fetch
653
+ // the remaining bytes. 1GB is configured by default, as this is close to
654
+ // the maximum allowed by the Autonomous Database service.
657
655
setPropertyIfAbsent (oracleDataSource ,
658
656
OracleConnection .CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE ,
659
- "1073741824 " );
657
+ "1000000000 " );
660
658
661
659
// TODO: Disable the result set cache? This is needed to support the
662
660
// SERIALIZABLE isolation level, which requires result set caching to be
Original file line number Diff line number Diff line change @@ -729,9 +729,8 @@ public void run() {
729
729
+ " PRIMARY KEY(id))" ));
730
730
731
731
// Insert two rows of LOBs larger than 1MB
732
- byte [] bytes = new byte [ lobSize ] ;
732
+ byte [] bytes = getBytes ( lobSize ) ;
733
733
ByteBuffer blobValue = ByteBuffer .wrap (bytes );
734
- Arrays .fill (bytes , (byte )'a' );
735
734
String clobValue = new String (bytes , US_ASCII );
736
735
awaitUpdate (List .of (1 ,1 ), connection .createStatement (
737
736
"INSERT INTO testLobPrefetch (blobValue, clobValue)"
You can’t perform that action at this time.
0 commit comments