phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karan Mehta (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-4999) Update statistics should not be allowed on tenant specific connection.
Date Tue, 30 Oct 2018 02:00:00 GMT
Karan Mehta created PHOENIX-4999:
------------------------------------

             Summary: Update statistics should not be allowed on tenant specific connection.
                 Key: PHOENIX-4999
                 URL: https://issues.apache.org/jira/browse/PHOENIX-4999
             Project: Phoenix
          Issue Type: Bug
            Reporter: Karan Mehta
            Assignee: Karan Mehta


Update statistics sql would can trigger partial stats collection when ran using a tenant
specific connection. Originally, update statistics internally runs scans on all the regions
of table. TenantId field bounds the scans on startKey and endKey in tenant specific connection,
which can cause stats to run only on specific regions and result in partial stats collection. 

Since the view data and table data reside in the same physical HBase table, it doesn't make
sense to allow users to run stats for specific tenants as tenants may span across regions.
The issue was first identified in PHOENIX-4333.

The patch however doesn't fully stop the SQL from running. Multiple approaches can be taken
here. 
 # Unset the tenantId on the connection before update statistics is run and reset it back
later. This can be tricky and bad to implement since tenantId is essentially a final field
on PhoenixConnection.
 # As [~tdsilva] pointed out, we can throw an UnsupportedOperationException() whenever user
tries to update statistics on tenant specific connection.

The second option seems straightforward to implement and can prevent accidental usage of this
sql.

[~Bin Shi] [~sukumaddineni] Any thoughts here?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message