Skip to content

Deprecate Replication.asyncEnabled — Weaviate v1.38 derives it server-side #571

@jeroiraz

Description

@jeroiraz

Background

Weaviate is removing the replicationConfig.asyncEnabled field from the underlying Go struct in v1.38 (server-side commit weaviate/weaviate@cef789345e, weaviate/weaviate#11214).

To avoid breaking already-released SDKs, the server keeps emitting the field in every GET /v1/schema response via a MarshalJSON shim on entities/models.ReplicationConfig. The emitted value is derived from current cluster state:

asyncEnabled = factor > 1 AND ASYNC_REPLICATION_DISABLED is not set

On the inbound side, the field is silently dropped — the new server no longer stores it.

Impact on weaviate/java-client

No crash today: the compat shim guarantees the JSON key is always present, so the Boolean asyncEnabled field of the Replication record will never deserialize as null against a v1.38 server.

https://github.com/weaviate/java-client/blob/main/src/main/java/io/weaviate/client6/v1/api/collections/Replication.java#L11

public record Replication(
    @SerializedName("factor") Integer replicationFactor,
    @SerializedName("asyncEnabled") Boolean asyncEnabled,
    @SerializedName("deletionStrategy") DeletionStrategy deletionStrategy,
    @SerializedName("asyncConfig") AsyncReplicationConfig asyncReplicationConfig) { … }

But the field is now deprecated on the wire: it carries no user-set value, it's derived from factor and the global kill-switch. The compat shim is a soft-landing layer — the long-term intent is to remove the field from responses too.

Recommended change

Treat asyncEnabled as deprecated client-side and stop exposing it as a configurable option:

  1. Mark the builder method asyncEnabled(boolean) as @Deprecated (annotate src/main/java/io/weaviate/client6/v1/api/collections/Replication.java L201–205) and have it no-op (don't include the field in outgoing payloads). The server already ignores it on input.
  2. Optionally drop the field from the Replication record's component list (L11), the constructor arg (L31), and the builder field (L191). This is a breaking client change — if you do it, time it with a major-version bump.
  3. Update the integration test src/it/java/io/weaviate/integration/CollectionsITest.java to drop the asyncEnabled(true) / asyncEnabled(false) builder calls (L154, L163, L476) and the returns(false, Replication::asyncEnabled) assertion (L178). The value will always be derived now; pinning a specific value in a test makes the test fragile to changes in ASYNC_REPLICATION_DISABLED or replication factor.

Why the urgency is "deprecate, not panic"

The server-side compat shim removes the immediate breakage. Clients on the current weaviate-client version against a v1.38 server will continue to function, with Replication::asyncEnabled returning Boolean.TRUE for any factor > 1 collection (unless the cluster is globally async-disabled). The only behavioural change users will notice is that the value is no longer settable — passing asyncEnabled(false) to the builder no longer disables async for that collection.

Target server version

Weaviate v1.38 (the release that includes #11214 plus the compat shim).

cc @weaviate/java-client-maintainers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions