PostgreSQL ts_kv export now retries transient query failures from the same
cursor, fails fast on non-transient errors, and cleans up time-series files
on latest-read failures.
Cassandra export reads partitions in ordered pages through retried queries.
The importer stops reading immediately after a failed insert, abort deletes
files even when close fails, and startup failures force JVM exit.
CassandraTsKvImporter submitted inserts with executor.submit and never
looked at the result, so a row whose insert failed after all retries was
dropped and the import still exited 0. CassandraService also retried every
error, including ones that can't succeed such as an invalid query, for
about 100s per row.
Now every failed insert is recorded with the row's position (counted
across files, like skip_lines). The import stops reading, skips queued rows
after the failure, lets earlier ones complete, and exits with an error
naming the CASSANDRA_IMPORT_TS_KV_SKIP_LINES value to resume from: every
row before it is imported. Unreadable files are handled the same way.
CassandraService retries only transient errors (timeouts, unavailable or
overloaded replicas, connection failures) and rethrows the rest at once.
- Failed or aborted exports can't be imported: abort() deletes all
time-series files (also the legacy ts_kv.gz), worker Throwables are
counted as failed keys, and the Cassandra exporter now fails like the
PostgreSQL one instead of writing a manifest for a partial export.
- The import rejects a working directory with both ts_kv_manifest.gz and
ts_kv.gz, which are files of two different exports.
- Each worker thread compresses into its own files, rolled over on the
compressed bytes written, so gzip no longer serializes the export.
- Key ids are resolved by name in key_dictionary, so a reused
ts_kv_latest.gz from an earlier export can't map to the wrong key.
- Timestamps near the long bounds are clamped instead of failing the key;
the first page is inclusive instead of using startTs - 1.
- MigrationService stops its workers when start() throws, so the JVM exits
instead of hanging.
- Validated at startup: DATABASE_MAX_POOL_SIZE > PARALLELISM_LEVEL,
Cassandra export start/end filters, TS_KV_EXPORT_MAX_FILE_SIZE_MB >= 0
(new TsKvWriterFactory).
- The query delay applies after every ts_kv query; NaN and Infinity
doubles are imported; part names use Locale.ROOT.
- Tests: PostgreSQL container test for PostgresTsKvExporter, importer
skip_lines across files and non-finite doubles, writer abort/crash/mixed
export cases. README: compatibility with older importers, keys without
latest values, measured cost per key by partition count.
Add PostgresTsKvExporter, so a tenant can be migrated from a PostgreSQL-only
(or TimescaleDB) setup to a hybrid PostgreSQL + Cassandra one. It reads the
history of every key in the exported ts_kv_latest from ts_kv with keyset
pagination and writes it in the CassandraTsKvExporter format, computing the
Cassandra partition from POSTGRES_TS_EXPORT_PARTITIONING (must match the
target's TS_KV_PARTITIONING). Invalid configs fail at startup, and a failed
key makes the export exit with an error without creating data.tar.
Both time-series exporters now write ts_kv_00001.gz, ts_kv_00002.gz, ... of
about TS_KV_EXPORT_MAX_FILE_SIZE_MB (default 256) and a ts_kv_manifest.gz
listing them, written last. The importer reads the manifest (or the legacy
single ts_kv.gz), rejects exports without it, reports progress against the
total row count and applies skip_lines across files. 0 keeps the legacy format.
Also cap the Hikari pool above parallelism_level and document Cassandra 4/5
compatibility (protocol pinning, the 2038 TTL limit).
core.state.ts imported ngrx-store-freeze statically, so the production bundle contained it and deep-freeze-strict, although only development builds used it and package.json lists it as a development dependency. The runtime checks strictStateImmutability and strictActionImmutability of the store, set in core.module.ts, freeze the state and the actions in development mode already.
core.state.ts imported ngrx-store-freeze statically, so the production bundle contained it and deep-freeze-strict, although only development builds used it and package.json lists it as a development dependency. The runtime checks strictStateImmutability and strictActionImmutability of the store, set in core.module.ts, freeze the state and the actions in development mode already.
* Fixed KPN downlink credentials not marked as required
* Marked Azure Service Bus downlink and OPC-UA keystore fields as required
---------
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
* Fixed the integration wizard ignoring the downlink converter after switching through a type without downlink
* Re-attached the downlink converter form only when the step is re-created
* Apply the converter version and defaults when the converters info loads after the converter is set
* Applied converter defaults only after they are loaded
---------
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
Two classes used its @PostConstruct and @PreDestroy; they use the jakarta.annotation ones instead, which Spring handles the same way. proto and edge-api declared it for generated gRPC code that no longer uses it: gRPC 1.76 marks its stubs with @GrpcGenerated.
Google libraries still bring it transitively.
java-driver-core 4.17.0 of com.datastax.oss declares spotbugs-annotations (LGPL-2.1) at compile scope, so the packages shipped it. DataStax donated the driver to Apache, which publishes it as org.apache.cassandra:java-driver-* since 4.18.0, where spotbugs-annotations and jcip-annotations are provided instead of compile; the Java packages are the same.
4.19.3 is the version that spring-boot-dependencies manages and that Spring Data Cassandra is built with, so the root pom sets no version of its own: every module, the migrator of PE and 4.4 included, gets the driver from the BOM that spring-boot-dependencies imports. Since 4.18.0 the driver has bug fixes and opt-in features; its shaded Guava is now org.apache.cassandra:java-driver-guava-shaded, and it uses the lz4-java of at.yawk.lz4, which the root pom already manages.
Four classes of dao-api used the spotbugs @NonNull through the driver; they use the jspecify @NonNull instead, so dao-api declares jspecify and the root pom manages its version, 1.0.1, the one Guava declares. The driver's classes carry the jcip annotations, so dao-api declares jcip-annotations provided to compile against them.
It was the last class of the CE code to use @PostConstruct and @PreDestroy of javax.annotation-api, which is licensed CDDL-1.0 or GPL-2.0 with the Classpath exception. Spring handles the jakarta.annotation ones the same way, as in the rest of the code.
The fork was adopted for the frequency and presence penalties of the Google GenAI models, which upstream 1.16.1 has. Of the fork's remaining changes, the modules ThingsBoard uses carry only three: AiServices features and an HTTP PATCH method that ThingsBoard does not reach, and a second setter for the content of Mistral AI messages. That setter conflicts with the one upstream added for the same purpose, so Jackson rejects every Mistral AI chat response with "Conflicting setter definitions for property content". Upstream parses both plain and reasoning responses.
core.state.ts imported ngrx-store-freeze statically, so the production bundle contained it and deep-freeze-strict, although only development builds used it and package.json lists it as a development dependency. The runtime checks strictStateImmutability and strictActionImmutability of the store, set in core.module.ts, freeze the state and the actions in development mode already.
* Show the Library tab when a converter is created from the integration form
* Simplified the converter integration info stream
---------
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
KCL 3.0.1 depends on com.amazonaws:dynamodb-lock-client 1.3.0, which is
licensed under the Amazon Software License. That license restricts use
of the library to Amazon's services, so it does not fit redistribution
as part of our product. KCL 3.1.2 depends on dynamodb-lock-client 1.4.0,
which is licensed under Apache-2.0.
In KCL 3.1 the SynchronousBlockingRetrievalFactory constructor takes an
additional SleepTimeController. KinesisPollingConfig now passes a
KinesisSleepTimeController, the same default that KCL's own
PollingConfig uses, so polling keeps its current behavior.