Skip to content

Log ZooKeeper-backed property changes#6465

Merged
DomGarguilo merged 1 commit into
apache:2.1from
DomGarguilo:log-config-property-changes
Jul 20, 2026
Merged

Log ZooKeeper-backed property changes#6465
DomGarguilo merged 1 commit into
apache:2.1from
DomGarguilo:log-config-property-changes

Conversation

@DomGarguilo

Copy link
Copy Markdown
Member

Fixes #6254

Adds INFO logging for property changes.

  • Logs set, remove, and modify operations for system, resource group, namespace and table properties
  • Log output includes user, scope, target, property and value
  • Sensitive props values are redacted

Here is some corresponding shell and logs:

root@uno> createtable config_log_table
root@uno config_log_table> config -t config_log_table -s table.custom.owner=dom
root@uno config_log_table> config -t config_log_table -s table.custom.owner=domG
root@uno config_log_table> config -t config_log_table -s table.custom.owner=domG
root@uno config_log_table> config -t config_log_table -d table.custom.owner
root@uno config_log_table> createnamespace config_log_ns
root@uno config_log_table> config -ns config_log_ns -s table.custom.owner=dom
root@uno config_log_table> config -ns config_log_ns -d table.custom.owner
root@uno config_log_table> config -s general.custom.test=abc
root@uno config_log_table> config -d general.custom.test
root@uno config_log_table> createresourcegroup config_log_rg
root@uno config_log_table> config -rg config_log_rg -s tserver.group.major.compaction.concurrent.max=2
root@uno config_log_table> config -rg config_log_rg -d tserver.group.major.compaction.concurrent.max
~ tail -f ~/github/fluo-uno/install/logs/accumulo/manager_default_1_thor.log | grep 'accumulo.configuration'
2026-07-07T16:43:39,880 Thread[126] [accumulo.configuration] INFO : action=set; user=root; scope=table; target=config_log_table; property=table.custom.owner; value=dom;
2026-07-07T16:43:45,559 Thread[182] [accumulo.configuration] INFO : action=set; user=root; scope=table; target=config_log_table; property=table.custom.owner; value=domG;
2026-07-07T16:43:48,830 Thread[111] [accumulo.configuration] INFO : action=set; user=root; scope=table; target=config_log_table; property=table.custom.owner; value=domG;
2026-07-07T16:43:58,552 Thread[108] [accumulo.configuration] INFO : action=remove; user=root; scope=table; target=config_log_table; property=table.custom.owner;
2026-07-07T16:44:33,328 Thread[140] [accumulo.configuration] INFO : action=set; user=root; scope=namespace; target=config_log_ns; property=table.custom.owner; value=dom;
2026-07-07T16:44:41,290 Thread[105] [accumulo.configuration] INFO : action=remove; user=root; scope=namespace; target=config_log_ns; property=table.custom.owner;
2026-07-07T16:44:59,034 Thread[110] [accumulo.configuration] INFO : action=set; user=root; scope=system; target=system; property=general.custom.test; value=abc;
2026-07-07T16:45:10,810 Thread[181] [accumulo.configuration] INFO : action=remove; user=root; scope=system; target=system; property=general.custom.test;
2026-07-07T16:45:35,614 Thread[139] [accumulo.configuration] INFO : action=set; user=root; scope=resourceGroup; target=config_log_rg; property=tserver.group.major.compaction.concurrent.max; value=2;
2026-07-07T16:45:44,676 Thread[108] [accumulo.configuration] INFO : action=remove; user=root; scope=resourceGroup; target=config_log_rg; property=tserver.group.major.compaction.concurrent.max;

@dlmarion

dlmarion commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I would suggest moving the logging to PropUtil, which is called from the ManagerClientServiceHandler for RPC calls, but also ZooPropEditor and a couple other places. It might be useful to add a commented-out logger configuration to the log4j-service.properties file like we do for the audit configuration too.

@ctubbsii

Copy link
Copy Markdown
Member

I think we should target 2.1 for these changes. It'd be really useful to log this for troubleshooting existing deployments.

@ctubbsii

Copy link
Copy Markdown
Member

It might be useful to add a commented-out logger configuration to the log4j-service.properties file like we do for the audit configuration too.

I don't think it would be useful to do that. The commented out audit logger already serves as an example of how to do it for any other logger that the user chooses. We don't need multiple examples, as it adds noise and reduces readability of the default config that we ship.

@DomGarguilo
DomGarguilo changed the base branch from main to 2.1 July 14, 2026 17:00
@DomGarguilo
DomGarguilo force-pushed the log-config-property-changes branch from e8361b0 to 4fde965 Compare July 14, 2026 17:00
@DomGarguilo

DomGarguilo commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

I would suggest moving the logging to PropUtil, which is called from the ManagerClientServiceHandler for RPC calls, but also ZooPropEditor and a couple other places.

I did this in 4fde965

I think we should target 2.1 for these changes. It'd be really useful to log this for troubleshooting existing deployments.

Done. I'll make a follow on PR against main to add this feature for resource group logging once this PR is merged up.

@DomGarguilo

Copy link
Copy Markdown
Member Author

Here is updated output from the logs:

~/github/accumulo (log-config-property-changes ✔) tail -f ~/github/fluo-uno/install/logs/accumulo/manager_default_1_pop-os.log | grep 'accumulo.configuration'
2026-07-14T12:58:27,435 Thread[101] [accumulo.configuration] INFO : action=set; scope=table; target=1; properties={table.constraint.1=org.apache.accumulo.core.data.constraints.DefaultKeySizeConstraint, table.iterator.majc.vers=20,org.apache.accumulo.core.iterators.user.VersioningIterator, table.iterator.majc.vers.opt.maxVersions=1, table.iterator.minc.vers=20,org.apache.accumulo.core.iterators.user.VersioningIterator, table.iterator.minc.vers.opt.maxVersions=1, table.iterator.scan.vers=20,org.apache.accumulo.core.iterators.user.VersioningIterator, table.iterator.scan.vers.opt.maxVersions=1};
2026-07-14T12:58:32,853 Thread[118] [accumulo.configuration] INFO : action=set; scope=table; target=1; properties={table.custom.owner=dom};
2026-07-14T12:58:37,008 Thread[122] [accumulo.configuration] INFO : action=set; scope=table; target=1; properties={table.custom.owner=domG};
2026-07-14T12:58:43,175 Thread[126] [accumulo.configuration] INFO : action=set; scope=table; target=1; properties={table.custom.owner=domG};
2026-07-14T12:58:47,371 Thread[131] [accumulo.configuration] INFO : action=remove; scope=table; target=1; properties=[table.custom.owner];
2026-07-14T12:59:00,543 Thread[110] [accumulo.configuration] INFO : action=set; scope=namespace; target=2; properties={table.custom.owner=dom};
2026-07-14T12:59:04,483 Thread[112] [accumulo.configuration] INFO : action=remove; scope=namespace; target=2; properties=[table.custom.owner];
2026-07-14T12:59:08,939 Thread[115] [accumulo.configuration] INFO : action=set; scope=system; target=system; properties={general.custom.test=abc};
2026-07-14T12:59:13,972 Thread[117] [accumulo.configuration] INFO : action=remove; scope=system; target=system; properties=[general.custom.test];

and the corresponding shell session

root@uno> createtable config_log_table
root@uno config_log_table> config -t config_log_table -s table.custom.owner=dom
root@uno config_log_table> config -t config_log_table -s table.custom.owner=domG
root@uno config_log_table> config -t config_log_table -s table.custom.owner=domG
root@uno config_log_table> config -t config_log_table -d table.custom.owner
root@uno config_log_table> createnamespace config_log_ns
root@uno config_log_table> config -ns config_log_ns -s table.custom.owner=dom
root@uno config_log_table> config -ns config_log_ns -d table.custom.owner
root@uno config_log_table> config -s general.custom.test=abc
root@uno config_log_table> config -d general.custom.test

@DomGarguilo
DomGarguilo merged commit 737cecd into apache:2.1 Jul 20, 2026
9 checks passed
@DomGarguilo
DomGarguilo deleted the log-config-property-changes branch July 20, 2026 14:26
public final class PropUtil {

private static final Logger CONFIG_LOG =
LoggerFactory.getLogger("org.apache.accumulo.configuration");

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.

@DomGarguilo We have precedent for having certain loggers that are not based on a class to be named uppercase. See LoggingMeterRegistryFactory's "org.apache.accumulo.METRICS". Perhaps this should be changed to "org.apache.accumulo.CONFIG" to follow that same convention?

Suggested change
LoggerFactory.getLogger("org.apache.accumulo.configuration");
LoggerFactory.getLogger("org.apache.accumulo.CONFIG");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Seems like a good idea to me too. Changed in #6488

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.

Determine when table properties have been set or modified

3 participants