[
https://issues.apache.org/jira/browse/KNOX-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Magyar updated KNOX-2844:
--------------------------------
Description:
Somehow we might need to differentiate between topologies which are externally
managed and topologies which are synced by the DB monitor. Otherwise every hand
deployed topology are getting deleted after enabling this feature with an empty
DB.
By using logical deletes we can avoid unwanted local file removals. This
implementation is more similar than the ZK based implementation where the
delete event is generated by zookeeper, so if something never existed in ZK it
will never be deleted from the file system.
The DB based implementation uses polling because we don't have these kind of
events (onDelete/onUpdate/onCreate). Originally the SQL based monitor removed
all the local files which were missing from the DB. But if we switch to logical
deletes, we can make sure that a file is only getting deleted if they were
previously added then (logically) removed from the DB.
After a certain period, we can do a full cleanup on the table and do physical
removals on older, logiacally deleted records).
was:
Somehow we might need to differentiate between topologies which are externally
managed and topologies which are synced by the DB monitor. Otherwise every hand
deployed topology are getting deleted after enabling this feature with an empty
DB.
By using logical deletes we can avoid unwanted local file removals. This
implementation is more similar than the ZK based implementation where the
delete event is generated by zookeeper, so if something never existed in ZK it
will never be deleted from the file system.
The DB based implementation uses polling because we don't have these kind of
events (onDelete/onUpdate/onCreate). Originally the SQL based monitor removed
all the local files which were missing from the DB. But if we switch to logical
deletes, we can make sure that a file is only getting deleted if it was
previously added then (logically) removed from the DB.
> Remote config monitor should not automatically delete local files if they're
> missing from the DB
> ------------------------------------------------------------------------------------------------
>
> Key: KNOX-2844
> URL: https://issues.apache.org/jira/browse/KNOX-2844
> Project: Apache Knox
> Issue Type: Sub-task
> Reporter: Attila Magyar
> Assignee: Attila Magyar
> Priority: Major
>
> Somehow we might need to differentiate between topologies which are
> externally managed and topologies which are synced by the DB monitor.
> Otherwise every hand deployed topology are getting deleted after enabling
> this feature with an empty DB.
> By using logical deletes we can avoid unwanted local file removals. This
> implementation is more similar than the ZK based implementation where the
> delete event is generated by zookeeper, so if something never existed in ZK
> it will never be deleted from the file system.
> The DB based implementation uses polling because we don't have these kind of
> events (onDelete/onUpdate/onCreate). Originally the SQL based monitor removed
> all the local files which were missing from the DB. But if we switch to
> logical deletes, we can make sure that a file is only getting deleted if they
> were previously added then (logically) removed from the DB.
> After a certain period, we can do a full cleanup on the table and do physical
> removals on older, logiacally deleted records).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)