Skip to content

v5.0.0

Choose a tag to compare

@Ahoo-Wang Ahoo-Wang released this 29 Oct 23:20
a559b3c

CosId 5.0.0

The first general availability release of CosId 5 (tag v5.0.0; the Docker image is tagged 5.0.0, 5.0 and
latest). It follows 5.0.0-rc.1, whose compatibility promise it keeps: the changes since, #1412–#1421,
are fixes, additions and documentation, plus one support change, the Spring Boot floor. Upgrading from 4.x: the
migration guide and the offline cosid-migration tool.

CosId 5 的第一个正式版。自 rc.1 以来的变化(#1412–#1421)都是修复、新增与文档,唯一的支持范围变化是 Spring Boot 的最低版本:
不再支持 Spring Boot 4.0.x,请升级到 4.1.2 或更高版本。 另外 starter 新增了对 spring-boot-starter 的依赖。

Released: 2026-10-30.

Important

Spring Boot 4.0.x is no longer supported (D49): upgrade to Spring Boot 4.1.2 or later. The published metadata of
the Spring modules requires the versions of Boot 4.1.2.

GA entry evidence

  • Release gate on the GA commit: PASS, 8 of 8 groups by D50, with one exception the user accepted. The eighth run
    against 4.1.1 (run 40887469149, be35de36), judged by D50 (#1421: a p99 / p99.9 limit is never below
    4.x + 100 ns) on its raw JSON; under the rules before D50 it read FAIL 3/8, each group with one p99.9 row, two of
    them tails of tens of nanoseconds (P5 segment, 4.x 50 / 71 ns against 5.x 90 / 110 ns; the Redis chain, 91 / 151
    against 110 / 170 ns) that D50 passes. The exception: MySqlStoreBenchmark.acquire_t1 p99.9, a component row
    (P10, the slot acquire at start-up): 4.1.1 2.7 / 2.4 ms, 5.0 4.0 / 3.4 ms (first run / re-run), while its mean,
    p99 and allocation pass and the MySQL chain end to end passes. Throughput, average time and allocation pass on every
    row. The segment group ran on an AMD EPYC 9V45 on which a bare AtomicLong reached 214 ops/µs at one thread; a
    segment reached 101–102% of it on 5.0 and 73–74% on 4.1.1. Evidence: docs/jmh/5.0.0/
    (the re-judged report, the run's own verdict and the 4.1.1 side).
  • GA review round 2 (docs/architecture/ga-review.md §10, 41 findings, no RC2 needed): both BLOCKERs fixed
    (#1415); the MAJORs fixed (#1415, #1418, this release's documentation); the MINORs of work packages 1–3 fixed.
  • Dependency alerts: none open (MyBatis 3.4.2 through Activiti, the last one, fixed in #1418).
  • The published jars run in a Maven and a Gradle application on Spring Boot 4.1.2 with the Redis and MongoDB stores
    (CI job published-jars, on every change of the Spring modules and stores since #1418).

What changed since rc.1

Spring Boot 4.1.2 and later only (#1416, D49)

  • The lowest Boot supported is the build's, 4.1.2: the published metadata of spring/* and the integrations requires
    the versions it resolves (spring-boot-autoconfigure 4.1.2, spring-data-jdbc 4.1.2), not those of 4.0.9.
  • CI tests Boot 4.1.2 on Java 21 and 25; -PspringBootVersion stays to probe a later Boot.

Migration from 4.x: the two BLOCKERs of round 2 (#1415)

  • config writes the stores apply wrote to (R2-mig-01): the type of target / machineTarget in
    apply-result.json, the JDBC table options, the Mongo database, Redis cluster and the ZooKeeper connect string;
    a change of store type is reported, and each migrated segment gets initial-offset, its migrated next value.
  • A snowflake's namespace of its own becomes a named machine (R2-parity-01, D37), migrated once like the shared
    cosid.generator.namespace; plan.json and apply-result.json gain machineNamespaces.
  • The tool checks and normalizes its store options (range-table is rangeTable; unknown keys are refused), carries
    the 4.x store options over (wait: N, fetchPlan, writeConcern, the Curator retry), waits for Redis Cluster
    replicas on the right connection, keeps URL passwords out of JDBC errors, and keeps the 4.x friendly text unpadded.

Core, Spring and server (#1418)

  • The starter depends on spring-boot-starter, as Spring Boot's starters do: an application with the CosId starter
    alone gets logging and YAML configuration (the published-jar smoke test found it missing).
  • cosid-activiti brings MyBatis 3.5.19 instead of the 3.4.2 of Activiti 7.0.0.SR1 (GHSA-qq48-m4jx-xqh8); MyBatis
    3.6 does not run Activiti 7.
  • uuidv7: the runtime's one UuidV7Generator counts every id (its Spring bean too), ends with the runtime as the
    other strategies do, and a disabled one keeps its bean, which throws on use.
  • Configuration: a key of another strategy (period on a segment) is ignored with a warning; a list replaced by a
    higher property source (a profile) is no unknown key.
  • StoreConfig / StoreSpec print their options without secrets; onBatchResized fires for every resize; the
    describe keys of uuidv7 are listed.
  • cosid-server: the JDBC pool keeps 2 idle connections, waits for one no longer than the store timeout, and has one
    per generator besides the blocking threads.
  • CI: the published jars run in a Maven and a Gradle application on Boot 4.1.2 with the Redis and MongoDB stores
    (published-jars); P8 of the release gate goes through the runtime.

The release gate: a floor for latency percentiles (#1421, D50)

A p99 / p99.9 limit is never below 4.x + 100 ns (and a component row's WARN limit likewise): below a microsecond a tail
moves by the timer's resolution and the runner's noise more than by 10%. Throughput, average time and allocation keep
their rules.

The cosid-server image on JDK 25 (#1414, D48)

The image runs on eclipse-temurin:25-jre; the jars stay Java 21 bytecode. From JDK 24 on (JEP 491) a virtual thread
no longer pins its carrier inside synchronized, and the server runs its requests on virtual threads.

Documentation (#1413, #1417, #1419)

  • GA review round 2 (docs/architecture/ga-review.md §10); decisions D39–D49 in the decision table.
  • uuidv7 and custom in every strategy list; the 4.x text API (generateAsString()) and its default radix 62 text in the
    migration guide; the 4.x proxy server keys against cosid-server's; the driver versions an application gets with Maven
    and Gradle (Lettuce 7.5.2 with Maven and the Boot parent, 7.9.0 with Gradle); the JavaScript precision of /ids; the
    protocol fields of /slots:*; the SPI method contracts; the skills of ahoo-cosid-skills 0.2.0.
  • The release gate's evidence: the benchmark page states the CI-runner model (D31) and the summary of the gate on the
    GA commit is in docs/jmh/5.0.0/; benchmark/scenarios.md lists the paths the gate does not measure.

Upgrading from 5.0.0-rc.1

Important

Spring Boot 4.0.x is no longer supported: upgrade to Spring Boot 4.1.2 or later (D49). The published metadata of
cosid-spring-boot-autoconfigure and the integrations requires the versions of Boot 4.1.2.

  1. Spring Boot 4.1.2 or later, as above.
  2. cosid-spring-boot-starter now depends on spring-boot-starter, as Spring Boot's starters do: logging and YAML
    configuration come with it. An application that has spring-boot-starter already sees no change; one that relied
    on the CosId starter alone now gets them, and with them application.yaml.
  3. cosid-activiti: MyBatis 3.5.19 now comes with it, above the 3.4.2 of Activiti 7.0.0.SR1. MyBatis 3.6 does not
    run Activiti 7.
  4. The migration tool: a 4.x snowflake with a namespace of its own needs that namespace migrated once on its own
    (plan --namespace <it> --layout-config …, then apply) before each service, as the shared
    cosid.generator.namespace does; run config again with the new apply-result.json. Store options the tool does
    not read are now refused: spell them as the store does.
  5. Redis with Maven: the Boot parent manages Lettuce 7.5.2, which wins over the 7.9.0 the store is built on; the
    store runs on both. Set <lettuce.version>7.9.0.RELEASE</lettuce.version> to have 7.9.0.
  6. Nothing else: no API, configuration, storage or protocol change needs you. A key set on a strategy it does not apply
    to (period on a segment) now logs a warning; it was and stays ignored.