Skip to content

TDB-20089, TDB-20090: Add support for relay and replica properties; switch to new server options from 12.1#238

Open
guptakshit wants to merge 3 commits intoTerracotta-OSS:masterfrom
guptakshit:move-to-new-options
Open

TDB-20089, TDB-20090: Add support for relay and replica properties; switch to new server options from 12.1#238
guptakshit wants to merge 3 commits intoTerracotta-OSS:masterfrom
guptakshit:move-to-new-options

Conversation

@guptakshit
Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines 227 to -231

options.add("--server-home");
options.add(ServerOption.NODE_HOME_DIR.getOption());
options.add(working.toString());

if (server.getConfigFile() != null) {
options.add("-f");
Copy link
Copy Markdown
Contributor Author

@guptakshit guptakshit Mar 31, 2026

Choose a reason for hiding this comment

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

relay and replica are only supported with new options, changing the default to the new options would not require any API level changes for the callers

private List<String> addServerHome(List<String> options, File workingDir) {
ArrayList<String> args = new ArrayList<>(options.size() + 2);
args.add("--server-home");
// --server-home is compatible with both old and new options
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

did you verify that ALL the options changes in this entire class work for 10.7, 10.11, 10.15, 11.1 and 12.1 ? If there's one mistake it's going to break tests

*
* @return deprecated format option, or null if not available in old format
*/
public String getDeprecatedOption() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

isn't it 'internal' option rather than deprecated?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

They are deprecated.
These options are also part of the deprecated CLI in tools.
And we maybe need to discuss when it is the time to remove them in the code because they are deprecated since years now.

@guptakshit guptakshit force-pushed the move-to-new-options branch from a691a15 to 33f0d93 Compare April 13, 2026 11:32
@guptakshit guptakshit changed the title TDB-20089, TDB-20090: Add relay and replica properties support and move to new server options when startupArgs are missing TDB-20089, TDB-20090: Add support for relay and replica properties; switch to new server options from 12.1 Apr 13, 2026
Copy link
Copy Markdown
Member

@mathieucarbou-ibm mathieucarbou-ibm left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this nice cleanup!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In 12.1 we also have the new security-log-dir option

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In 12.1 we also have the new security-log-dir option


// 11.x, 12.x and above => TCDB
// 12.1 and above => TCDB
if (version.getMajor() >= 12 && version.getMinor() >= 1) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

with this condition, future 13+ releases will be ignored if minor ==0, e.g. 13.0, and will get the Distribution107Controller (condition below)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added test cases for DistributionController types based on different versions

NODE_BACKUP_DIR("-b", "-backup-dir"),
SECURITY_DIR("-x", "-security-dir"),
SECURITY_AUDIT_LOG_DIR("-u", "-audit-log-dir"),
SECURITY_LOG_DIR(null, "security-log-dir"),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't it be -security-log-dir (with the dash) ?

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.

3 participants