milleruntime commented on PR #2975: URL: https://github.com/apache/accumulo/pull/2975#issuecomment-1260730437
> Metrics and status commands only need to read FATE status and it would be a coding error if they attempted to update a FATE. This is accomplished by simply using Java polymorphism. If we revert back to the original code, I don't think there is anything else to do. The original code creates a ZooStore object but it declares the type as `ReadOnlyTStore`. For example: <pre> private final ReadOnlyTStore<FateMetrics> zooStore; ... this.zooStore = new ZooStore<>(fateRootPath, context.getZooReaderWriter()); this.zooStore.getStatus(1234L); this.zooStore.delete(1234L); // compile error </pre> It may be less confusing to rename the variable but otherwise we are fine. Use of the `ReadOnlyTStore` type prevents any updates to a FATE TX. If anything, we may want to drop the class ReadOnlyStore altogether. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
