Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.1.0
-
None
-
None
Description
It may take a while for sentry to get full snapshot from HMS. During this interval, table rename event could happen.
The current behavior:
1) get notification ID before full snapshot: NotificationID_before
2) get full snapshot
3) get notification ID after full snapshot: NotificationID_after
4) If NotificationID_after != NotificationID_before, get notification events between, and apply them to the full snapshot through FullUpdateModifier.applyEvent().
5) save the updated full snapshot with NotificationID_after
When there is a privilege associated with the old table, and table rename event happens during full snapshot, the privilege is not associated with the renamed table.
The solution is to change the behavior as following:
1) get notification ID before full snapshot: NotificationID_before
2) get full snapshot
3) get notification ID after full snapshot: NotificationID_after
4) Save the full snapshot with NotificationID_before
5) When HMSFollower gets notification events from NotificationID_before, the notification events during full snapshot will be processed through NotificationProcessor.processNotificationEvent()
In this way, sentry always processes the notification events through NotificationProcessor.processNotificationEvent(), and the privilege will be associated with renamed table.
This issue only happens when events, such as table rename, happens during full snapshot.