rdblue commented on code in PR #7880:
URL: https://github.com/apache/iceberg/pull/7880#discussion_r1335224069
##########
core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java:
##########
@@ -334,7 +399,72 @@ public FileIO io() {
@Override
protected String tableName() {
- return tableIdentifier.toString();
+ return fullTableName;
+ }
+ }
+
+ private class InMemoryViewOperations extends BaseViewOperations {
+ private final FileIO io;
+ private final TableIdentifier identifier;
+ private final String fullViewName;
+
+ InMemoryViewOperations(FileIO io, TableIdentifier identifier) {
+ this.io = io;
+ this.identifier = identifier;
+ this.fullViewName = ViewUtil.fullViewName(catalogName, identifier);
+ }
+
+ @Override
+ public void doRefresh() {
+ String latestLocation = views.get(identifier);
+ if (latestLocation == null) {
+ disableRefresh();
+ } else {
+ refreshFromMetadataLocation(latestLocation);
+ }
+ }
+
+ @Override
+ public synchronized void doCommit(ViewMetadata base, ViewMetadata
metadata) {
Review Comment:
It looks like although this is now `synchronized`, there's no protection
against concurrently modifying the state fields of the catalog. Any
modification to `namespaces`, `tables`, or `views` should be protected.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]