Repository navigation
RANGER-5466 Avoid hardcoded delta sync and unnecessary LDAP filter when delta sync is disabled - #827
Conversation
…en delta sync is disabled
568a7fe to
d152786
Compare
|
Seems there are tests failures: |
There was a problem hiding this comment.
One minor change, can you please update this if condition to if (config.isDeltaSyncEnabled() && (computeDeletes)) ? That way it is much easier to understand the code. In case of delta sync not enabled, anyway we are performing full sync all the time and not using deltaSyncGroupTime or deltaSyncGroupTimeStamp in the filter.
There was a problem hiding this comment.
One minor change, can you please update this if condition to
if (!groupUserTable.rowKeySet().isEmpty() || (config.isDeltaSyncEnabled() && (computeDeletes)))
? That way it is much easier to understand the code. In case of delta sync not enabled, anyway we are performing full sync all the time and not using deltaSyncGroupTime or deltaSyncGroupTimeStamp in the filter.
@pradeepagrawal8184 |
…en delta sync is disabled (apache#827) * RANGER-5466 Avoid hardcoded delta sync and unnecessary LDAP filter when delta sync is disabled * RANGER-5466 Update ugsync tests for conditional delta sync filter * RANGER-5466 Simplify delta sync reset conditions per review
What changes were proposed in this pull request?
setup.py: Changed hardcoded
ranger.usersync.ldap.deltasync=trueto only set the default value when the property is not already configured in install.properties.LdapUserGroupBuilder: Skip appending delta sync filter conditions (uSNChanged, modifyTimestamp) to LDAP search queries when delta sync is disabled. Applied to both getUsers() and getGroups()
Some LDAP services (e.g., Google Workspace Secure LDAP) do not support the attributes used for delta sync (uSNChanged, modifyTimestamp), which causes delta sync to not work properly. In such cases, users should be able to disable delta sync and run full sync without unnecessary filter conditions being included in the LDAP queries.
How was this patch tested?