Skip to content

Bump mongo-java-driver from 3.12.4 to 3.12.10 - #4

Merged
lvca merged 1 commit into
mainfrom
dependabot/maven/org.mongodb-mongo-java-driver-3.12.10
Sep 16, 2021
Merged

lvca merged 1 commit into
mainfrom
dependabot/maven/org.mongodb-mongo-java-driver-3.12.10

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 16, 2021 •

Copy link
Copy Markdown
Contributor

Bumps mongo-java-driver from 3.12.4 to 3.12.10.

Release notes

Sourced from mongo-java-driver's releases.

Java Driver 3.12.8 (February 18, 2021)

Release Notes: https://developer.mongodb.com/community/forums/t/mongodb-java-driver-3-12-8-released/16823

Java Driver 3.12.6 (July 8, 2020)

Release Notes: https://developer.mongodb.com/community/forums/t/mongodb-java-driver-3-12-6-released/6448/2

Java Driver 3.12.5 (June 2, 2020)

Release Notes: https://developer.mongodb.com/community/forums/t/mongodb-java-driver-3-12-5-released/4886

Commits
  • d5e75f4 Build: version 3.12.10
  • 9c4c81a Docs: Updated for 3.12.10 release
  • 149a04c Disable test that no longer passes on 5.1 server
  • 2a32ac3 Support aggregation with $merge as a string (#768)
  • 81cc1a7 Add top-level error labels to write concern error (#766)
  • c3c0a2c Set proper stream factory in AbstractUnifiedTest
  • 411d5dc Remove misleading note about mongocryptd in reference docs
  • b062e59 Disable tests of legacy wire protocol on 5.1+ servers
  • ba6aef8 Build: version 3.12.10-SNAPSHOT
  • 39815b4 Build: version 3.12.9
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file java labels Aug 16, 2021
@arcade-player

Copy link
Copy Markdown
Contributor

@dependabot rebase

@dependabot
dependabot Bot force-pushed the dependabot/maven/org.mongodb-mongo-java-driver-3.12.10 branch 2 times, most recently from 81de53e to 8786b96 Compare September 1, 2021 07:01
Bumps [mongo-java-driver](https://github.com/mongodb/mongo-java-driver) from 3.12.4 to 3.12.10.
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](mongodb/mongo-java-driver@r3.12.4...r3.12.10)

---
updated-dependencies:
- dependency-name: org.mongodb:mongo-java-driver
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/maven/org.mongodb-mongo-java-driver-3.12.10 branch from 8786b96 to 44f17ac Compare September 16, 2021 15:52
@lvca
lvca merged commit f30d7b1 into main Sep 16, 2021
@dependabot
dependabot Bot deleted the dependabot/maven/org.mongodb-mongo-java-driver-3.12.10 branch September 16, 2021 21:26
@claude claude Bot mentioned this pull request May 5, 2026
2 tasks done
lvca added a commit that referenced this pull request Nov 18, 2026
…ed with the live records (#12487)

Fixes #10614

## What was wrong

A Cypher label write cannot change a vertex's type in place:
`LabelReplacements.replace` writes a new vertex under the new type,
re-creates every incident edge under new RIDs and deletes the originals.
The write steps redirected the row they were writing, and each later row
before it was written, but never a row that had already been written.

In the reporter's query, row 1 (`n1 = 13`) removes nothing and is
buffered by `REMOVE`; row 2 (`n1 = 27`) then removes `l9` from 27, which
rewrites 27 and both relationships and deletes the originals (one of
them `#4:0`). Row 1 still held the deleted 27 and the deleted `rt8` edge
in its path, and was answered with them: Bolt failed in
`BoltStructureMapper.toPath` with `Record #4:0 not found`, HTTP answered
RIDs of records that no longer exist.

## Fix

- `SetStep`, `RemoveStep` and `MergeStep` redirect each row when they
serve it, as `ForeachStep` already does (#11764), so a row written
before a later row of the same batch relabelled one of its records
leaves the step with the live records. The clauses after the write then
read the live graph (a node a later row relabelled no longer reports the
label, as Neo4j answers).
- The drain of a write statement
(`CypherExecutionPlan.executeStreaming`, and `profile()`) redirects
every row it collected before ending the statement
(`LabelReplacements.redirectRows`), so a row that waited downstream in a
barrier (an `ORDER BY`, a `DISTINCT`, a later batch) when the write ran
is answered with the live records too.
- `LabelReplacements.redirect` also redirects the row's element: a
`RETURN` of a single node carries it as the element, which is what the
HTTP JSON is built from.
- `RETURN DISTINCT` and `WITH DISTINCT` key a replacement record by the
RID its replacement chain started from (`LabelReplacements.distinctKey`,
also inside lists, maps and paths), so a row projected before a later
row's write (holding the original) and one projected after it (holding
the replacement) are one row, as Neo4j, where a node keeps its identity,
answers. The collapse happens in the DISTINCT step itself, so `SKIP` and
`LIMIT` apply to the right rows.

- The branches of a write `UNION` share one map of label replacements
(they used to have one each), so a row of an earlier branch follows a
later branch's label write, and `UNION` (not `ALL`) keys rows the same
way as `DISTINCT`.

A statement with no label write pays one map check per row served and
one per statement.

## Tests

- `CypherLabelWriteRedirectsEmittedRowsIssue10614Test` (engine): the
reporter's query, the same through `SET`, a later clause reading an
earlier row, a row buffered in an `ORDER BY` across batches (also
through the element and the JSON), `RETURN DISTINCT` (and `DISTINCT *`,
`SKIP`, `LIMIT`, `WITH DISTINCT`, lists and paths) across batches, write
`UNION` / `UNION ALL` across branches, and `PROFILE`.
- `Issue10614BoltPathAfterLabelRemovalIT` (bolt): the reporter's query
over the wire, both rows with their paths.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Fixed Cypher write queries so returned nodes, relationships, and paths
reflect changes made during query execution, including label and
property updates.
* Improved consistency for results across batches and in queries using
`DISTINCT`, `UNION`, `WITH`, or profiling. Returned paths and connected
records now remain valid after changes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
lvca added a commit that referenced this pull request Nov 21, 2026
…ting by it deletes that edge only (#12145)

Fixes #12132.

### Problem

Every lightweight edge of a type answered the same `elementId()`, the
record-less marker `#<type bucket>:-1` that the edge lists store. The
relationship element-id filter is a per-row string compare, so with an
id read from ONE edge, `MATCH ()-[r:L]->() WHERE elementId(r) = $id
DELETE r` deleted EVERY lightweight edge of the type. Bolt put the same
string in `Relationship.element_id`, so a driver that sent it back hit
the same delete. SQL `SELECT DISTINCT(@this) FROM L` also collapsed all
the lightweight edges into one row.

### Semantics chosen

A lightweight edge gets an element id that names it, built from what its
`LightEdgeRID` already carries:

```
#<type bucket>:-1/<out RID>/<in RID>          e.g. #7:-1/#1:0/#4:0
#<type bucket>:-1/<out RID>/<in RID>/<n>      the n-th (n >= 1) parallel twin of the same (type, out, in)
```

Why this shape, and not refusing (`null`) the way `id()` does since
#9573:
- openCypher / Neo4j: `elementId()` identifies one relationship and is
meant to be handed back. A `null` would make the delete safe but would
break every application that reads relationship ids. Lightweight edges
have no properties, so endpoints plus the twin occurrence are their
whole identity. That is the identity the engine already uses for `=`,
`DISTINCT` and relationship uniqueness (`LightEdgeRID.isSameEdge` /
`distinctKey`, #9573, #10008).
- It is deliberately NOT a RID (`RID.is()` is false for it). No RID seek
and no `id()`/RID-string coercion in `ComparisonExpression` can take it
for a record address. The old `#7:-1` value now matches no edge at all,
instead of all of them.
- It is the same from either end. The out and in lists number twins
alike (tested from the OUT side, the IN side and undirected).
- Twins: the occurrence is resolved through the iteration's
`LightEdgeCensus`, so a list is walked about twice per iteration, not
once per edge. After one twin is deleted, the occurrences renumber.
Which twin a stale id names can therefore shift, but twins carry nothing
to tell them apart, and deleting by either twin's id removes exactly one
(tested for both twins).
- `id()` stays `null` (#9573): a lightweight edge has no position to
encode in the numeric id.

### Changes

- `LightEdgeRID.toElementId()`: the id above.
- `ElementIdFunction`: answers `ElementIdFunction.of(rid)`, the RID
string for records and `toElementId()` for a lightweight edge.
- `BoltStructureMapper.toRelationship` / `toUnboundRelationship`: use
the same `ElementIdFunction.of`, so the Bolt `element_id` and
`elementId(r)` agree. Mapping a lightweight edge also threw before
(`Cannot encode RID #4:-1 as a numeric id()`), so no Bolt query could
return one. A lightweight relationship now gets a negative numeric id, a
64-bit FNV-1a hash of its element id. No record id is negative, so the
two can never collide, and `id(r)` stays null, so no `WHERE id(r) = ...`
can resolve to it.
- `DistinctExecutionStep` (SQL `DISTINCT`): a row whose element identity
determines the output but has no record address (the RID fast path
refuses `position < 0`) was keyed by its properties alone, and a
lightweight edge has none. It is now keyed by its identity too, with
twins told apart by `LightEdgeRID.distinctKey()`, as in openCypher.

### Tests

- `CypherLightEdgeTest.Issue12132LightEdgeElementId` (engine; all red on
`main` except the side-independence check):
- three lightweight edges have three distinct ids, none parses as a RID,
and record-backed edges still answer their RID
- the id is the same read from the OUT side, the IN side and undirected
- deleting by the id of one edge, in a second statement or in the same
statement through `WITH`, deletes only that edge; the old `#bucket:-1`
value deletes nothing
- parallel twins have distinct ids, the same from both ends; deleting by
either twin's id leaves the other
- SQL `SELECT DISTINCT(@this) FROM L` and `SELECT DISTINCT @this FROM L`
return 3 rows
- `Issue12132LightEdgeElementIdTest` (bolt): the Bolt relationship and
unbound-relationship element ids equal `elementId(r)` and differ per
edge; the numeric ids are negative and differ per edge (on `main` the
mapping throws).

Ran: `CypherLightEdgeTest` (all nested), `LightEdgeRIDOccurrenceTest`,
`LightEdgeCensusTest`, `CollectDistinctTest`,
`CypherExplainTraditionalPlanTest`, `CypherMissingFunctionsTest`,
`OpenCypherCollectUnwindTest`, `OpenCypherFunctionTest`,
`OpenCypherScalarFunctionsComprehensiveTest`,
`DistinctWithGroupByUnwindExpandTest`, `DistinctExecutionStepTest`,
`SelectStatementExecutionTest`, `LightweightEdgeTypeTest`,
`LightweightEdgeScanAndWriteTest`, `LightEdgeRegressionTest` (engine);
`Issue12132LightEdgeElementIdTest`, `Bolt4998PathMappingTest`,
`BoltStructureTest` (bolt).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Lightweight relationships now have distinct, stable element IDs,
including when multiple relationships connect the same vertices.
* Using an element ID to delete a lightweight relationship now removes
only the matching relationship.
* Queries and returned paths now distinguish parallel lightweight
relationships correctly, including when applying `DISTINCT` or reading
relationships from either direction.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: lvca <l.garulli@arcadedata.com>
lvca added a commit that referenced this pull request Nov 21, 2026
…oes (#11967)

Fixes #11958.

### Problem

A Postgres-wire json column holding a record (`@this`, a Cypher node) or
a map (`properties(n)`, a map literal) was rendered by
`record.toJSON(true)` or `new JSONObject(map)`. Temporals came out as
epoch numbers: a DATE as epoch days in a record and epoch milliseconds
in a map, and a map dropped the zone of a ZONED_DATETIME and the
sub-millisecond digits of a DATETIME_NANOS. HTTP sends the same row as
formatted text.

### Change

- `PostgresType` renders a record, a result row, a map or a path through
`JsonSerializer`, the serializer the HTTP API uses, wherever a json
column carries one: the scalar column, an element of a json column
holding an array (a path included, e.g. `collect(p)`), and an element of
a `text[]` or `json[]` array in text and binary format. Vertex edge
counts are left out, as `toJSON(true)` left them out.
- The date patterns come from the database the value belongs to: the
record's, or the row's (`Result.getDatabase()`) when the row is not an
element. A value no database owns (a map literal, a row built without
one) uses the configured default patterns.
- One `JsonSerializer` instance serves every connection
(`PostgresType.JSON_DOCUMENT_SERIALIZER`). It is configured once in the
static initializer and never changed, and a serialization keeps no state
in the serializer (date patterns and type hints live in locals of each
call), the same pattern as gRPC's shared `FAST`/`SAFE` serializers. No
per-value allocation of a serializer on the row path.
- A record that is not a document (an edge segment, a stripe directory,
the payload of an EXTERNAL property) keeps its own `toJSON(true)`:
`JsonSerializer` has no form for those and would hand the record back,
so the column would carry its `toString()`.
`Issue11958JsonDocumentShapesTest.aRecordThatIsNotADocumentKeepsItsOwnJson`
pins it.
- `JsonSerializer` gets a public `serializeValue(Database, Object)` that
delegates to the existing private `serializeValue(database, value,
null)`. The schema pattern lookups now go through two helpers that fall
back to `GlobalConfiguration.DATE_FORMAT` / `DATE_TIME_FORMAT` when the
database is null. Every HTTP call site passes a database, so their
output is unchanged;
`Issue11958SerializeValueTest.httpRowRenderingIsUnchanged` pins the HTTP
rendering of these values.

### Behaviour change for clients (release notes)

This changes what a Postgres client receives in a json column. Scalar
temporal columns (DATE, TIMESTAMP OIDs) are unchanged.

- **Temporals inside json documents are text, not epoch numbers.** A
client that read a DATE or DATETIME inside a json column as a number
(epoch days or epoch milliseconds) must parse the formatted text
instead, the same text and the same schema `dateFormat` /
`dateTimeFormat` the HTTP API sends.
- **Paths** (`MATCH p = ... RETURN p`) keep the `{_type, nodes,
relationships, length}` object with the same members in the same order.
Each node and relationship gains the record attributes the HTTP API
sends with it: `@rid`, `@type`, `@cat`, plus `@in` / `@out` on a
relationship. `path.toMap()` wrote each record with `toJSON(false)`,
which left them out. Non-temporal property values are the same. Measured
in `aPathKeepsTheShapeOfItsMapAndGainsTheRecordAttributes`:
- before:
`{"_type":"path","nodes":[{"name":"a","n":7,"da":19782,"dt":1709212455123,"dtn":"2024-02-29
13:14:15.123456789",...}],"relationships":[{"da":19782,"w":2}],"length":1}`
- after:
`{"_type":"path","nodes":[{"@Rid":"#1:0","@type":"T11958","name":"a","n":7,"da":"2024-02-29","dt":"2024-02-29
13:14:15.123","dtn":"2024-02-29
13:14:15.123456789",...,"@cat":"v"}],"relationships":[{"@Rid":"#4:0","@type":"E11958","da":"2024-02-29","w":2,"@cat":"e","@in":"#1:1","@out":"#1:0"}],"length":1}`
- **Rows that are not elements** (a projection such as `SELECT da AS d,
name FROM T` yields one) keep the members and the order of
`result.toJSON()`; only the temporals change. Measured in
`aRowThatIsNotAnElementKeepsTheShapeOfItsJson`:
- before:
`{"name":"a","n":7,"da":1709164800000,"dt":1709212455123,"dtn":1709212455123,"nested":{"da":1709164800000}}`
- after: `{"name":"a","n":7,"da":"2024-02-29","dt":"2024-02-29
13:14:15.123","dtn":"2024-02-29
13:14:15.123456789","nested":{"da":"2024-02-29"}}`
- **DECIMAL still differs from HTTP.** A DECIMAL in those documents is
unchanged: a JSON number with its exact digits
(`12345678901234567890.123456789`), where HTTP sends a string.

### Measured (E2E, psycopg 3.3.9, container with this branch's engine
and postgresw jars)

`SELECT @this AS rec, {'da': da, 'dt': dt, 'dtn': dtn, 'zdt': zdt} AS m
FROM T` and `{cypher}MATCH (n:T) RETURN n, properties(n) AS props`:

| property | before, record | before, map | after, record and map (same
as HTTP) |
|---|---|---|---|
| DATE | `19782` | `1709164800000` | `"2024-02-29"` |
| DATETIME | `1709212455123` | `1709212455123` | `"2024-02-29
13:14:15.123"` |
| DATETIME_NANOS | `"2024-02-29 13:14:15.123456789"` | `1709212455123` |
`"2024-02-29 13:14:15.123456789"` |
| ZONED_DATETIME | `"2024-03-10T03:30-04:00[America/New_York]"` |
`1710055800000` | `"2024-03-10T03:30-04:00[America/New_York]"` |

This E2E table was measured on the first commit; the follow-up commit's
paths are covered by the tests below, not by a second psycopg run.

### Tests

- `Issue11958JsonColumnTemporalsIT` (pgjdbc): a record and a map in SQL
and Cypher (fails on main: DATE `19782` vs `"2024-02-29"`); a Cypher
path (`MATCH p = ... RETURN p`); Cypher lists of nodes, maps and paths
(`collect(n)`, `collect(properties(n))`, `collect(p)`); a map inside a
`text[]` (`SELECT ['text', {...}]`); the rows of a subquery (`SELECT
(SELECT da, dt, dtn, zdt FROM T) AS rows`).
- `Issue11958JsonDocumentShapesTest` (postgresw, embedded): a json
column holding a list of records, maps, nested lists and paths; a json
document inside a `text[]` literal and inside binary `text[]` and
`json[]` arrays; path and non-element row shapes compared with
`path.toMap()` and `result.toJSON()`; a non-element query row rendered
with its database's custom `dateFormat`; the non-document record branch.
- `Issue11958SerializeValueTest` (engine): pins the HTTP row rendering
and checks `serializeValue` matches it, with and without a database.
- Run on the latest commit: `mvn -o -pl postgresw -am verify
-DskipITs=false
-Dtest='com/arcadedb/postgres/**/*Test,Issue11958SerializeValueTest'
-Dit.test='com/arcadedb/postgres/**/*IT'`: postgresw unit 1001 run, ITs
624 run, engine 2 run; 0 failures, 0 errors, 0 skipped.

### Overlap with #11920

#11920 (#11838) also edits `PostgresType.java`, in the Bind parameter
decoding (`deserializeText` / `deserializeBinary`, UUID). This PR
touches only the json rendering of result values (`toText`,
`arrayElementToText`, the json array helpers), so the two do not change
the same code.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Fixed JSON serialization of date and date-time values when records are
returned through PostgreSQL, including values nested in maps, lists,
arrays, and paths.
* Temporal values now retain their expected formatting in
database-backed and detached records, including date precision and time
zones.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: lvca <l.garulli@arcadedata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants