Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
moscicky committed Jul 30, 2024
1 parent d891d4b commit 1bb0bb0
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,18 @@ public void createTopic(Topic topic) {
* and upon receiving 'KeeperException.NotEmptyException' it tries to remove children recursively
* and then retries the node removal. This means that there is a potentially large time gap between
* removal of 'topic/subscriptions' node and 'topic' node, especially when topic removal is being done
* in remote DC. It turns out that 'PathChildrenCache' used for 'HierarchicalCacheLevel' in
* consumers and management recreates 'topic/subscriptions' node when deleted. If the recreation is faster
* than the removal of 'topic' node, than the whole removal process must be repeated resulting in a lengthy loop
* that may even result in StackOverflowException.
* in remote DC.
* <p>

Check warning on line 97 in hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java

View workflow job for this annotation

GitHub Actions / checkstyle-hermes-common

[checkstyle-hermes-common] hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java#L97 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck>

<p> tag should be placed immediately before the first word, with no space after.
Raw output
/home/runner/work/hermes/hermes/hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java:97:0: warning: <p> tag should be placed immediately before the first word, with no space after. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck)

Check warning on line 97 in hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java

View workflow job for this annotation

GitHub Actions / checkstyle-hermes-common

[checkstyle-hermes-common] hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java#L97 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck>

<p> tag should be preceded with an empty line.
Raw output
/home/runner/work/hermes/hermes/hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java:97:0: warning: <p> tag should be preceded with an empty line. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck)
* It turns out that 'PathChildrenCache' used by 'HierarchicalCacheLevel' in
* Consumers and Frontend listens for 'topics/subscriptions' changes and recreates that node when deleted.
* If the recreation happens between the 'topic/subscriptions' and 'topic' node removal
* than the whole removal process must be repeated resulting in a lengthy loop that may even result in StackOverflowException.
* Example of that scenario would be
* 1. DELETE 'topic' - issued by management, fails with KeeperException.NotEmptyException
* 2. DELETE 'topic/subscriptions' - issued by management, succeeds
* 3. CREATE 'topic/subscriptions' - issued by frontend, succeeds
* 4. DELETE 'topic' - issued by management, fails with KeeperException.NotEmptyException
* [...]
* <p>

Check warning on line 108 in hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java

View workflow job for this annotation

GitHub Actions / checkstyle-hermes-common

[checkstyle-hermes-common] hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java#L108 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck>

<p> tag should be placed immediately before the first word, with no space after.
Raw output
/home/runner/work/hermes/hermes/hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java:108:0: warning: <p> tag should be placed immediately before the first word, with no space after. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck)

Check warning on line 108 in hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java

View workflow job for this annotation

GitHub Actions / checkstyle-hermes-common

[checkstyle-hermes-common] hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java#L108 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck>

<p> tag should be preceded with an empty line.
Raw output
/home/runner/work/hermes/hermes/hermes-common/src/main/java/pl/allegro/tech/hermes/infrastructure/zookeeper/ZookeeperTopicRepository.java:108:0: warning: <p> tag should be preceded with an empty line. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocParagraphCheck)
* To solve this we must remove 'topic' and 'topic/subscriptions' atomically. However, we must also remove
* other 'topic' children. Transaction API does not allow for 'optional' deletes so we:
Expand Down

0 comments on commit 1bb0bb0

Please sign in to comment.