Skip to content

Commit 6db7b8a

Browse files
authored
Merge branch 'main' into main
2 parents 778c859 + b52984d commit 6db7b8a

File tree

239 files changed

+5378
-543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+5378
-543
lines changed

CHANGELOG.md

Lines changed: 68 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,67 @@
22
All notable changes to this project will be documented in this file.
33
The format is based on [Keep a Changelog](http://keepachangelog.com/).
44

5+
## [5.4.8] 2023-01-05
6+
7+
### Fixed
8+
- Cloud only: Fixed an issue where a long running application using SignatureProvider
9+
with instance principal may encounter NotAuthenticated error after several minutes even
10+
if authentication succeeds for the first requests.
11+
12+
### Changed
13+
- Updated copyrights to 2023
14+
15+
## [5.4.7] 2022-12-06
16+
17+
Note: there are no 5.4 releases before 5.4.7
18+
19+
### Added
20+
- Support for new, flexible wire protocol (V4) has been added. The previous protocol
21+
is still supported for communication with servers that do not yet support V4. The
22+
version negotation is internal and automatic; however, use of V4 features will fail
23+
at runtime when attempted with an older server. Failure may be an empty or
24+
undefined result or an exception if the request cannot be serviced at all. The following
25+
new features or interfaces depend on the new protocol version
26+
- added set/getDurability to QueryRequest for queries that modify data
27+
- added pagination information to TableUsageResult and TableUsageRequest
28+
- added shard percent usage information to TableUsageResult
29+
- added IndexInfo.getFieldTypes to return the type information on an index on a JSON
30+
field
31+
- added the ability to ask for and receive the schema of a query using
32+
* PrepareRequest.setGetQuerySchema
33+
* PreparedStatement.getQuerySchema
34+
- Cloud only: added use of ETags, DefinedTags and FreeFormTags in TableRequest and TableResult
35+
- Cloud only: Updated OCI regions (SGU, IFP)
36+
37+
### Changed
38+
- Consistency is now a class and no longer a simple enumeration. Applications must
39+
be recompiled but source compatibility is maintained for all but the more complex
40+
use of an enumeration
41+
- Made one private serializer class public to allow for improved internal testing.
42+
- MapValue now implements Iterable
43+
44+
## [5.3.7] 2022-10-18
45+
46+
### Changed
47+
- Allow application to retry a QueryRequest if it gets a timeout exception and the query only does reads
48+
- Cloud only: Updated OCI regions (ORD, BGY, TIW, MXP, DUS, DTM, ORK, SNN)
49+
- Update netty dependency to 4.1.82.Final
50+
51+
### Fixed
52+
- Cloud only: Fixed an issue where a long running application using SignatureProvider
53+
with resource principal may encounter NotAuthenticated error after several minutes even
54+
if authentication succeeds for the first requests.
55+
56+
## [5.3.6] 2022-08-23
57+
58+
### Added
59+
- Added support for parent/child tables usage in WriteMultiple requests.
60+
61+
## [5.3.5] 2022-07-20
62+
63+
### Added
64+
- Made one private serializer class public to allow for improved internal testing.
65+
566
## [5.3.4] 2022-06-16
667

768
NOTE: there was briefly a 5.3.3 release available on GitHub. This release is functionally
@@ -18,8 +79,6 @@ query that returns row_version() as a BinaryValue. The Version can be used for
1879
conditional put and delete operations
1980
- added support for setting an extension to the User Agent http header by
2081
setting the ExtensionUserAgent property on NoSQLHandlerConfig.
21-
22-
### Changed
2382
- Cloud only: Added OCI regions: CDG (Paris), MAD (Madrid), QRO (Queretaro)
2483

2584
## [5.3.2] 2022-03-21
@@ -243,7 +302,7 @@ MapValue instances created from JSON to maintain the insertion order of fields
243302
in the map so that iteration is predictable.
244303

245304
### Fixed
246-
- Don't validate request sizes. On-premise only
305+
- Don't validate request sizes. On-premises only
247306
- JsonOptions.setPrettyPrint(true) now works
248307
- Request timeouts now operate correctly on milliseconds instead of rounding up to seconds
249308
- Changed min/max implementation to make them deterministic
@@ -258,7 +317,7 @@ removed in a future version.
258317
- Fix another memory leak that could occur on the receive side when the response
259318
was discarded due to unmatched request Id.
260319
- Fixed a problem where the HTTP Host header was not being adding in all request
261-
cases. This prevented use of an intermediate proxy such as Nginx, which validates headers. On-premise only.
320+
cases. This prevented use of an intermediate proxy such as Nginx, which validates headers. On-premises only.
262321
- TableUsageRequest: added validation check that startTime, endTime and limit
263322
must not be negative value.
264323

@@ -304,16 +363,16 @@ exact schema match is required on a put. The default behavior is false.
304363
- Added a new, simpler TableResult.waitForCompletion() interface to wait for the completion of a TableRequest vs waiting for a specific state.
305364
- Added NoSQLHandle.doTableRequest to encapsulate a TableRequest and waiting for
306365
its completion in a single, synchronous call.
307-
- Added OperationNotSupportedException to handle operations that are specific to on-premise and cloud service environments
366+
- Added OperationNotSupportedException to handle operations that are specific to on-premises and cloud service environments
308367

309-
- Support for both the Oracle NoSQL Database Cloud Service and the on-premise Oracle NoSQL Database product.
310-
- Added StoreAccessTokenProvider for authentication of access to an on-premise store
368+
- Support for both the Oracle NoSQL Database Cloud Service and the on-premises Oracle NoSQL Database product.
369+
- Added StoreAccessTokenProvider for authentication of access to an on-premises store
311370
- Added AuthenticationException to encapsulate authentication problems when
312-
accessing an on-premise store.
371+
accessing an on-premises store.
313372
- Added SystemRequest, SystemStatusRequest, and SystemResult for administrative
314373
operations that are not table-specific.
315374
- Added NoSQLHandle.doSystemRequest to encapsulate a SystemRequest and waiting for its completion in a single, synchronous call.
316-
- Now that the driver can access both the cloud service and an on-premise store
375+
- Now that the driver can access both the cloud service and an on-premises store
317376
some operations, classes and exceptions are specific to each environment. These are
318377
noted in updated javadoc.
319378

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016, 2022 Oracle and/or its affiliates. All rights reserved.
1+
Copyright (c) 2016, 2023 Oracle and/or its affiliates. All rights reserved.
22

33
The Universal Permissive License (UPL), Version 1.0
44

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ project. The version changes with each release.
3737
<dependency>
3838
<groupId>com.oracle.nosql.sdk</groupId>
3939
<artifactId>nosqldriver</artifactId>
40-
<version>5.3.2</version>
40+
<version>5.4.8</version>
4141
</dependency>
4242
```
4343

@@ -117,7 +117,7 @@ See the Quickstart example below for code details for using a Resource Principal
117117

118118
### Connecting to the Oracle NoSQL Database On-premise
119119

120-
The on-premise configuration requires a running instance of Oracle NoSQL
120+
The on-premises configuration requires a running instance of Oracle NoSQL
121121
Database. In addition a running proxy service is required. See
122122
[Oracle NoSQL Database Downloads](https://www.oracle.com/database/technologies/nosql-database-server-downloads.html) for downloads, and see
123123
[Information about the proxy](https://docs.oracle.com/en/database/other-databases/nosql-database/22.3/admin/proxy-and-driver.html)
@@ -130,6 +130,7 @@ See the Quickstart example below for code details for connecting on-premise.
130130

131131
When you develop an application, you may wish to start with
132132
[Oracle NoSQL Database Cloud Simulator](https://www.oracle.com/downloads/cloud/nosql-cloud-sdk-downloads.html).
133+
133134
The Cloud Simulator simulates the cloud service and lets you write and test
134135
applications locally without accessing the Oracle NoSQL Database Cloud Service.
135136
You may run the Cloud Simulator on localhost.
@@ -138,11 +139,16 @@ You may run the Cloud Simulator on localhost.
138139
Authorization for the Cloud Simulator is a simple no-op class implemented directly
139140
in the Quickstart example.
140141

142+
## Logging
143+
144+
Addional logging can be enabled using a java properties file. For full details, see
145+
"Logging in the SDK" at https://oracle.github.io/nosql-java-sdk/oracle/nosql/driver/package-summary.html
146+
141147
## Quickstart
142148

143149
The following is a quick start tutorial to run a simple program in all supported
144150
environments. It requires access to the Oracle NoSQL Database Cloud Service,
145-
a running on-premise Oracle NoSQL Database instance, or a running Oracle
151+
a running on-premises Oracle NoSQL Database instance, or a running Oracle
146152
NoSQL Cloud Simulator instance. As a standalone program it will run most easily
147153
using a download version of the Oracle NoSQL SDK for Java.
148154

@@ -159,7 +165,7 @@ Using the cloud service on region us-ashburn-1
159165
```
160166
$ java -cp .:<path-to-nosqldriver.jar> Quickstart -service cloud -endpoint us-ashburn-1
161167
```
162-
Using a non-secure on-premise service on endpoint http://localhost:8090
168+
Using a non-secure on-premises service on endpoint http://localhost:8090
163169
```
164170
$ java -cp .:<path-to-nosqldriver.jar> Quickstart -service onprem -endpoint http://localhost:8090
165171
```
@@ -175,7 +181,7 @@ is required if using Instance Principal or Resource Principal authorization.
175181

176182
```
177183
/*-
178-
* Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
184+
* Copyright (c) 2019, 2023 Oracle and/or its affiliates. All rights reserved.
179185
*
180186
* Licensed under the Universal Permissive License v 1.0 as shown at
181187
* https://oss.oracle.com/licenses/upl/
@@ -218,7 +224,7 @@ import oracle.nosql.driver.values.MapValue;
218224
*
219225
* This program can be run against:
220226
* 1. the cloud service
221-
* 2. the on-premise proxy and Oracle NoSQL Database instance, secure or
227+
* 2. the on-premises proxy and Oracle NoSQL Database instance, secure or
222228
* not secure.
223229
* 3. the cloud simulator (CloudSim)
224230
*
@@ -505,7 +511,7 @@ $ mvn -pl examples exec:java -Dexec.mainClass=BasicTableExample \
505511
-Dexec.args="http://localhost:8080"
506512
```
507513

508-
Run BasicTableExample using an on-premise instance on endpoint
514+
Run BasicTableExample using an on-premises instance on endpoint
509515
localhost:8090
510516

511517
```
@@ -552,7 +558,7 @@ The region argument will change depending on which region you use.
552558

553559
#### Run using the Oracle NoSQL Database On-premise
554560

555-
Running against the on-premise Oracle NoSQL Database on-premise requires
561+
Running against the on-premises Oracle NoSQL Database on-premises requires
556562
a running instance of the database and running proxy service. See above.
557563

558564
Run against a not-secure proxy and store, with the proxy running on port 80:

build_spec.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
2+
3+
version: 0.1
4+
component: build
5+
timeoutInSeconds: 1000
6+
shell: bash
7+
8+
steps:
9+
- type: Command
10+
name: "compress the repo"
11+
command: |
12+
tar -cvzf ${OCI_WORKSPACE_DIR}/repo.tgz ./
13+
outputArtifacts:
14+
- name: artifact
15+
type: BINARY
16+
location: ${OCI_WORKSPACE_DIR}/repo.tgz
17+
Footer
18+
© 2023 GitHub, Inc.
19+
Footer navigation
20+
Terms
21+
Privacy
22+
Security

driver/pom.xml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>com.oracle.nosql.sdk</groupId>
3131
<artifactId>nosqldriver</artifactId>
32-
<version>5.3.4</version>
32+
<version>5.4.8</version>
3333
<packaging>jar</packaging>
3434

3535
<organization>
@@ -43,11 +43,11 @@
4343
<maven.compiler.target>1.8</maven.compiler.target>
4444
<timestamp>${maven.build.timestamp}</timestamp>
4545
<maven.build.timestamp.format>d-MMMM-yyyy</maven.build.timestamp.format>
46-
<copyright>Copyright (c) 2011, 2022 Oracle and/or its affiliates. All rights reserved.</copyright>
46+
<copyright>Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.</copyright>
4747
<java.apidoc>http://docs.oracle.com/javase/8/docs/api</java.apidoc>
4848
<maven.deploy.skip>false</maven.deploy.skip>
49-
<netty.version>4.1.77.Final</netty.version>
50-
<jackson.version>2.12.5</jackson.version>
49+
<netty.version>4.1.86.Final</netty.version>
50+
<jackson.version>2.13.2</jackson.version>
5151
<bouncy.version>1.70</bouncy.version>
5252
<!-- by default, skip tests; tests require a profile -->
5353
<maven.test.skip>true</maven.test.skip>
@@ -57,7 +57,7 @@
5757
<profiles>
5858

5959
<!-- test profiles used with the test target
60-
Running tests requires a running on-premise service and httpproxy
60+
Running tests requires a running on-premises service and httpproxy
6161
or a running cloud simulator. Required information:
6262
o endpoint
6363
Examples:
@@ -85,7 +85,7 @@
8585
<secure>false</secure>
8686
<onprem>false</onprem>
8787
<serverType>cloudsim</serverType>
88-
<!-- exclude non-server tests and on-premise tests -->
88+
<!-- exclude non-server tests and on-premises tests -->
8989
<excluded.tests>
9090
StoreAccessTokenProviderTest.java, ResourcePrincipalProviderTest.java,
9191
ConfigFileTest.java, SignatureProviderTest.java,
@@ -347,7 +347,7 @@
347347
May need to post-process the doc to remove the package and link.
348348
-->
349349
<excludePackageNames>
350-
oracle.nosql.driver.http;oracle.nosql.driver.httpclient;oracle.nosql.driver.query;oracle.nosql.driver.util
350+
oracle.nosql.driver.http;oracle.nosql.driver.httpclient;oracle.nosql.driver.query;oracle.nosql.driver.util;oracle.nosql.driver.ops.serde.nson
351351
</excludePackageNames>
352352
<stylesheetfile>${basedir}/../doc/style.css</stylesheetfile>
353353
<show>public</show>
@@ -413,6 +413,16 @@
413413
<artifactId>exec-maven-plugin</artifactId>
414414
<version>3.0.0</version>
415415
<executions>
416+
<execution>
417+
<id>human-readable NSON string generation</id>
418+
<phase>generate-sources</phase>
419+
<configuration>
420+
<executable>${basedir}/scripts/build_nson_strings.sh</executable>
421+
</configuration>
422+
<goals>
423+
<goal>exec</goal>
424+
</goals>
425+
</execution>
416426
<execution>
417427
<id>add license files to runtime jar</id>
418428
<phase>package</phase>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
4+
#
5+
# This file was distributed by Oracle as part of a version of Oracle NoSQL
6+
# Database made available at:
7+
#
8+
# http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
9+
#
10+
# Please see the LICENSE file included in the top-level directory of the
11+
# appropriate version of Oracle NoSQL Database for a copy of the license and
12+
# additional information.
13+
14+
# this script creates java code to enable using human-readable strings for field
15+
# names in nson debug/logging/verbose output. It modifies NsonProtocol.java to
16+
# add a map of field names to human readable field names.
17+
18+
PROTOCOL_FILE=src/main/java/oracle/nosql/driver/ops/serde/nson/NsonProtocol.java
19+
20+
# delete everything after the last static string
21+
lastline=$(grep -n 'public static String [A-Z]' $PROTOCOL_FILE | tail -1 | sed -e 's/:.*$//')
22+
head -$lastline $PROTOCOL_FILE > /tmp/proto.$$
23+
24+
# add a static array of string arrays
25+
grep 'public static String ' /tmp/proto.$$ | awk 'BEGIN{printf("\n private static String[][] mapVals = new String[][] {\n");}{printf(" {%s,\"%s\"},\n",$4,$4);}END{printf(" };\n");}' >> /tmp/proto.$$
26+
27+
# add remaining logic
28+
cat << EOT >> /tmp/proto.$$
29+
30+
private static HashMap<String, String> fieldMap = null;
31+
32+
public static String readable(String field) {
33+
if (fieldMap == null) {
34+
fieldMap = new HashMap<String, String>();
35+
for (int x=0; x<mapVals.length; x++) {
36+
fieldMap.put(mapVals[x][0], mapVals[x][1]);
37+
}
38+
}
39+
String val = fieldMap.get(field);
40+
if (val == null) {
41+
return field;
42+
}
43+
return val;
44+
}
45+
}
46+
EOT
47+
48+
# replace file
49+
mv /tmp/proto.$$ $PROTOCOL_FILE
50+

driver/src/main/java/oracle/nosql/driver/AuthorizationProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*-
2-
* Copyright (c) 2011, 2022 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl/

driver/src/main/java/oracle/nosql/driver/BatchOperationNumberLimitException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*-
2-
* Copyright (c) 2011, 2022 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl/

0 commit comments

Comments
 (0)