-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68302/
-----------------------------------------------------------

(Updated Aug. 13, 2018, 7:18 p.m.)


Review request for sentry, Arjun Mishra, kalyan kumar kalvagadda, and Sergio 
Pena.


Bugs: sentry-2342
    https://issues.apache.org/jira/browse/sentry-2342


Repository: sentry


Description (updated)
-------

check if sentry version is compatible with DB schema version or not instead of 
checking if they are equal. This allows multi-version multi-clusters share the 
same DB
The approach is
1) When verifying schema, add a new input to specify if the check is strick 
(the schema version in DB has to be the same as the schema version in software 
or 2) just check if they are compatible.

When checking compatible in isSchemaVersionCompatible, 
1) If DB version is based on schema version used by Sentry Server (DB version 
string starts with software version), then it is compatible with Sentry server
2) DB version is shorter than the schema version used by Sentry Server, not 
compatible
3) major version number not equal, not compatible
4) sentry server has same major version but newer minor version than DB, not 
compatible.
5) sentry server has same major version but equal or smaller minor version than 
DB, compatible.


Diffs
-----

  
sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java
 0d4f26c 
  sentry-tools/src/main/java/org/apache/sentry/cli/tools/SentrySchemaTool.java 
4c3df20 
  
sentry-tools/src/test/java/org/apache/sentry/cli/tools/TestSentrySchemaTool.java
 84c2484 


Diff: https://reviews.apache.org/r/68302/diff/1/


Testing
-------

TestSentrySchemaTool passed


Thanks,

Na Li

Reply via email to