sanjeet006py commented on code in PR #2041:
URL: https://github.com/apache/phoenix/pull/2041#discussion_r1887240748
##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java:
##########
@@ -761,13 +761,22 @@ public PTable getTable(String name) throws SQLException {
}
public PTable getTable(PTableKey key) throws SQLException {
- PTable table;
- try {
- table = getTableRef(key).getTable();
- } catch (TableNotFoundException e) {
- table = getTableNoCache(key.getName());
+ PTableRef tableRef = getTableRefNoTNFE(key);
+ if (tableRef == null && key.getTenantId() != null) {
+ tableRef = getTableRefNoTNFE(new PTableKey(null, key.getName()));
Review Comment:
> Maybe you should be using a global connection in the first place.
With global connection I feel one tenant can modify the records of other
tenants by providing some other tenant Id in UPSERT. With tenant specific
connection I think we are able to impose tenant boundaries and prevent one
tenant from modifying records of other tenants. I think on a multi-tenant base
table we should be able to read and write using tenant connection. WDYT?
--
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]