SLING-10854 : introducing SlingIdCleanupTask to clean up old slingIds… (#13)

* SLING-10854 : introducing SlingIdCleanupTask to clean up old slingIds under /var/discovery/oak automatically

* SLING-10854 : more test coverage

* SLING-10854 : more test coverage

* SLING-10854 : logging cleanup

* SLING-10854 : modifier cleanup

* SLING-10854 : added run counter to log info

* SLING-10854 : fix variable name

Co-authored-by: Jörg Hoh <joerghoh@users.noreply.github.com>

* SLING-10854 : fix rename change

* SLING-10854 : log scheduledDate for convenience

* SLING-10854 : use resolver.getResource rather than ResourceHelper.getOrCreateResource to avoid unintended creation of resources

* SLING-10854 : remove unnecessary copy-paste-leftover revert

* SLING-10854 : beautify try catch clause

* SLING-10854 : more test coverage

* SLING-10854 : orphaned syncTokens support added

* SLING-10854 : disabled by default and introduced system property org.apache.sling.discovery.oak.slingidcleanup.enabled to enable

* SLING-10854 : added a minimal delay between a successful run and a follow-up run - to reduce unnecessary load on the repository for likely empty cleanup executions

* SLING-10854 : lower a logger to debug

* SLING-10854 : fix description

Co-authored-by: Jörg Hoh <joerghoh@users.noreply.github.com>

* SLING-10854 : test stability improvement

* SLING-10854 : avoid deleting slingIds ever seen by then leader

* SLING-10854 : minor comment fix

* SLING-10854 : shrink cleanup method size

* SLING-10854 : reduce log.infos

* SLING-10854 : getActiveSlingIdsFrom extracted

* SLING-10854 : some more code reductions

* SLING-10854 : added comment about not considering a slingId garbage if it was ever seen by the then leader

* SLING-10854 : minor javadoc rewording

* SLING-10854 : and some docu about the odd choice of 13h min delay added

* SLING-10854 : shorten config names

* SLING-10854 : rename getActiveSlignIdsFrom

* SLING-10854 : use streams rather than verbose for loops

Co-authored-by: Rishabh Kumar <rishabhdaim1991@gmail.com>

* SLING-10854 : fix stream code

* SLING-10854 : renamed method to topologyChanged

* SLING-10854 : fixed seenInstances concurrency

* SLING-10854 : log message improved

* SLING-10854 : reformating only

---------

Co-authored-by: Jörg Hoh <joerghoh@users.noreply.github.com>
Co-authored-by: Rishabh Kumar <rishabhdaim1991@gmail.com>
2 files changed
tree: 8f593c724cedefc34379c8d0cefbfc1a060cd6e6
  1. src/
  2. .gitignore
  3. bnd.bnd
  4. CODE_OF_CONDUCT.md
  5. CONTRIBUTING.md
  6. Jenkinsfile
  7. LICENSE
  8. pom.xml
  9. README.md
README.md

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central discovery License

Apache Sling Oak-Based Discovery Service

This module is part of the Apache Sling project.

Implementation of Apache Sling Discovery based on Jackrabbit Oak using its discovery-lite descriptor for in-cluster view detection and a TopologyView through HTTP POST heartbeats announcing sub-topologies to each other.