Skip to content

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Oct 30, 2025

This PR adds support for replication ops:

var op = client.cluster.replicate("Things", "shard-123", "from-node", "to-node", ReplicationType.MOVE);

var replication = client.cluster.replication.get(op.uuid());
assert op.uuid() == replication.uuid();

// List replicate operations
var all = client.cluster.replication.list(opt -> opt.includeHistory(true));
var shard123Repls = client.cluster.replication.list(opt -> opt.shard("shard-123"));

// Cancel and delete
client.cluster.replication.cancel(op.uuid());
client.cluster.replication.delete(op.uuid());
client.cluster.replication.deleteAll();

I decided to group query() and list() operations under one name and just provide 2 overloads for list(), because this is a pattern used in many other places around the client, e.g. client.alias.list() (filter by collection) and client.users.db.list() (optionally include "last used at" time).

@bevzzz bevzzz self-assigned this Oct 30, 2025
Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz merged commit 08bd1ac into v6 Nov 4, 2025
2 checks passed
@bevzzz bevzzz deleted the v6-replication branch November 4, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants