Releases: ydb-platform/yoj-project
YOJ 2.6.23 (ASYNC secondary indexes)
Improvements
- f3207db Support
ASYNC
secondary indexes (https://ydb.tech/docs/en/concepts/secondary_indexes#async) - d984fc9 Optimize
YqlPredicate.{in,notIn}(<single element>)
toYqlPredicate.{eq,neq}(<that element>)
Bugfixes
- 14b61ca
RelPredicate.negate()
returnedLegacyRelPredicate
by mistake
API Changes - Minor
v2.5.16
This is a backport release with important changes from 2.6.23.
Improvements
- f3207db Support
ASYNC
secondary indexes (https://ydb.tech/docs/en/concepts/secondary_indexes#async) - d984fc9 Optimize
YqlPredicate.{in,notIn}(<single element>)
toYqlPredicate.{eq,neq}(<that element>)
Bugfixes
- 14b61ca
RelPredicate.negate()
returnedLegacyRelPredicate
by mistake
YOJ 2.6.22 (minor fixes)
YOJ 2.6.21 (fix NPE in YdbRepositoryTransaction.trace)
- FIX occasional NPE in
YdbRepositoryTransaction.trace()
java.lang.NullPointerException: Cannot invoke "tech.ydb.table.Session.getId()" because "this.session" is null
YOJ 2.6.20
❌ Please do not use this release as it can cause NPE in YdbRepositoryTransaction.trace()
, use 2.6.21 instead.
-
InMemoryDataShard
: Allow to replaceTreeMap
with an explicitly sortedLinkedHashMap
to reduce comparison count
If you have a massive amount ofinsert()
s/save()
s and only occasionally get the list of sorted entities,
you will likely gain massive performance benefits from using an alternative in-memory data shard map
implementation usingLinkedHashMap
(even if sorted oninsert()
, but especially if sorted on reads).To switch map implementation, set the
tech.ydb.yoj.repository.test.inmemory.impl
system property
tooninsert
(for sorting data oninsert()
) oronget
(for sorting data on first read.) -
Bump SnakeYAML version: 2.3 -> 2.4
YOJ 2.6.19 (Query statistics)
❌ Please do not use this release as it can cause NPE in YdbRepositoryTransaction.trace()
, use 2.6.21 instead.
- Add query statistics collection and improve query traces
- Query traces are now easier to read by humans, and also include more information. For maximum verbosity, enable the following Java system properties:
tech.ydb.yoj.repository.ydb.trace.dumpYdbParams
: Additionally log converted query parameter values, as represented by YDB Java SDKValue
tech.ydb.yoj.repository.ydb.trace.verboseObjParams
: Log all statement parameters, not just the first fewtech.ydb.yoj.repository.ydb.trace.verboseObjResults
: Log all statement results, not just the first few
- Query traces are now easier to read by humans, and also include more information. For maximum verbosity, enable the following Java system properties:
- #148: Remove
--!syntax_v1
directive from YQL queries generated by YOJ
YOJ 2.6.18 (Case-insensitive LIKE/CONTAINS)
Features:
- #146 (Support case-insensitive LIKE/CONTAINS)
Dependency Updates:
- Protobuf: 3.24.0 -> 3.25.5 (fixes GHSA-735f-pc8j-v9w8)
- Netty: 4.1.100.Final -> 4.1.118.Final (fixes GHSA-4g8c-wm8x-jfhw)
- Jackson: 2.17.1 -> 2.17.3
- Log4j2: 2.17.2 -> 2.23.1
- GSON: 2.10.1 -> 2.12.1
- errorprone annotations: 2.14.0 -> 2.36.0
- Kotlin (optional dependency): 1.9.22 -> 1.9.24
- Mockito (test dependency): 5.5.0 -> 5.11.0
- SnakeYAML (test dependency, for Log4j2 YAML config in tests): 1.33 -> 2.3
- Testcontainers (test dependency, for testing
yoj-repository-ydb-v2
): 1.19.1 -> 1.19..5 - Docker Java (test dependency, for testing
yoj-repository-ydb-v2
): 3.3.3 -> 3.4.2 - Kotlin Compile Testing (test dependency, for testing
yoj-ext-meta-generator
): 1.5.0 -> 1.6.0
Improvements:
YOJ 2.5.15 (backport case-insensitive LIKE/CONTAINS from 2.6.18)
YOJ 2.6.17 (UUID YDB columns)
- #140: Add support for YDB
UUID
column type, viaDbType.UUID
specified in@Column(dbType=...)
annotation (or a meta-annotation carrying (possibly transitively) a@Column
annotation). - Update YDB SDK to 2.3.14 (was 2.3.9) and YDB Proto APIs to 1.7.1 (was 1.6.4)
YOJ 2.6.16 (API improvements)
Key changes ( ❌ denotes breaking changes )
- ➕
YdbTable
now exposes itsQueryExecutor
to subclasses via aprotected getExecutor()
method, and adds apublic getSchema()
method for getting entity schema used for mapping the rows of this table. This makes custom tables with custom queries a little less quirky (but this is still far from an official way of creating custom statements; that will be explored in #43). - ➕ New
@InternalApi
annotation that clearly specifies which publicly visible parts of YOJ API (interfaces, classes, methods, fields, constants, and so on) are implementation details exposed for cross-package and cross-module usage. - ❌
Table
interface methodfind(Set<ID>)
is now required. Direct implementors ofTable
must implement this new method (either by delegating to anotherTable
or by using the internalTableQueryImpl
utility). Those who extendedAbstractDelegatingTable
don't need to do anything. - ❌
Table
interface has dropped thegetFirstLevelCache()
method. There is no replacement.- Direct implementors of
Table
should just delete their implementation ofgetFirstLevelCache()
. - Users of
Table.getFirstLevelCache()
should do one of the following:- Reconsider their usage of Internal API.
- If the usage cannot be eliminated, obtain a
FirstLevelCache
instance by getting it from currentRepositoryTransaction
'sTransactionLocal
:First-level cache can only be used if you have avar tx = Tx.Current.get(); var repositoryTransaction = tx.getRepositoryTransaction(); var transactionLocal = repositoryTransaction.getTransactionLocal(); var cache = transactionLocal.firstLevelCache(<table descriptor>);
RepositoryTransaction
instance or can obtain it from currentTx
instance (which is established byTxManager
, so if you're inside a transaction body, you can do this). First-level cache is per-table descriptor per-transaction; its behavior outside of transaction is undefined.
- Direct implementors of