[
https://issues.apache.org/jira/browse/KNOX-2844?focusedWorklogId=826889&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-826889
]
ASF GitHub Bot logged work on KNOX-2844:
----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Nov/22 15:39
Start Date: 17/Nov/22 15:39
Worklog Time Spent: 10m
Work Description: zeroflag opened a new pull request, #680:
URL: https://github.com/apache/knox/pull/680
## What changes were proposed in this pull request?
This is a draft PR.
## How was this patch tested?
```xml
<property>
<name>gateway.service.remoteconfigurationmonitor.impl</name>
<value>org.apache.knox.gateway.topology.monitor.db.DbRemoteConfigurationMonitorService</value>
</property>
<property>
<name>gateway.database.type</name>
<value>mysql</value>
</property>
<property>
<name>gateway.database.connection.url</name>
<value>jdbc:mysql://root:root@localhost:3306/knox</value>
</property>
```
Issue Time Tracking
-------------------
Worklog Id: (was: 826889)
Remaining Estimate: 0h
Time Spent: 10m
> 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
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)