bookkeeper.git
19 hours agounified latency metric unit (#3501) master
StevenLuMT [Tue, 27 Sep 2022 03:02:54 +0000 (11:02 +0800)] 
unified latency metric unit (#3501)

Descriptions of the changes in this PR:

### Motivation

The latency of the OpStatsLogger.registerSuccessfulEvent calculation is to convert the time to milliseconds
<img width="855" alt="image" src="https://user-images.githubusercontent.com/42990025/191929953-bdac2d25-3fbe-4697-b3e9-f4942ed7c074.png">
but Counter.add nothing to do

so when using Counter for latency statistics, the time unit and OpStatsLogger are not unified, which is easy to be misleading.
then we unified latency metric unit

### Changes

1.  change name : Counter.add -->  Counter.addCount
2. add new method Counter.addLatency to count the time and convert the time to milliseconds

then how to use counter correctly:
1. when using Counter for latency metric, call Counter.addLatency
2. when using Counter for count metric, call Counter.addCount

4 days agodocs: fix bookkeeper command path in decommission doc (#3499)
Fushu Wang [Fri, 23 Sep 2022 08:46:53 +0000 (16:46 +0800)] 
docs: fix bookkeeper command path in decommission doc (#3499)

8 days agoSpeed up the rebuildinding of RocksDB index (#3458)
Matteo Merli [Mon, 19 Sep 2022 15:59:57 +0000 (08:59 -0700)] 
Speed up the rebuildinding of RocksDB index (#3458)

* Speed up the rebuildinding of RocksDB index

* fix check style

Co-authored-by: chenhang <chenhang@apache.org>
8 days agoCheck if channel closed before processing read request (#3486)
Michael Marshall [Mon, 19 Sep 2022 09:57:51 +0000 (02:57 -0700)] 
Check if channel closed before processing read request (#3486)

* Check if channel closed before processing read request

* Add missed call to onReadRequestFinish()

* Fix test

* Mock more tests

Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
11 days agoBump snakeyaml from 1.31 to 1.32 to solve CVE-2022-38752 (#3491)
Tian Luo [Fri, 16 Sep 2022 00:49:47 +0000 (08:49 +0800)] 
Bump snakeyaml from 1.31 to 1.32 to solve CVE-2022-38752 (#3491)

11 days agoMigrate centos7 to ubuntu 22.10, reduce image size (#3492)
ZhangJian He [Fri, 16 Sep 2022 00:49:06 +0000 (08:49 +0800)] 
Migrate centos7 to ubuntu 22.10, reduce image size (#3492)

### Changes
- migrate statestore image from centos7 to ubuntu
- use `--no-install-recommends` to reduce image size
- elminate `gcc`、`gcc-c++` in image

Thanks for @lhotari

Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
13 days agoAutoRecovery - Do not call shutdown() on the main ZookKeeper client thread (#3487)
Enrico Olivelli [Wed, 14 Sep 2022 20:09:57 +0000 (22:09 +0200)] 
AutoRecovery - Do not call shutdown() on the main ZookKeeper client thread (#3487)

2 weeks agoMigrate Dockerfile from centos to ubuntu and python3 (#3483)
ZhangJian He [Tue, 13 Sep 2022 06:23:15 +0000 (14:23 +0800)] 
Migrate Dockerfile from centos to ubuntu and python3 (#3483)

2 weeks agoAdd 4.15.1 to versions file (#3475)
Yong Zhang [Tue, 13 Sep 2022 03:49:08 +0000 (11:49 +0800)] 
Add 4.15.1 to versions file (#3475)

* Add 4.15.1 to versions file
---

*Motivation*

Add 4.15.1 to version file to update the website

* Regenerate the website docs

* Fix a minor issue

2 weeks agoupgrade hadoop version to 3.2.4 (#3485)
Hang Chen [Tue, 13 Sep 2022 03:47:37 +0000 (11:47 +0800)] 
upgrade hadoop version to 3.2.4 (#3485)

2 weeks agoAdd option to clean up test ledger after simpletest. (#3474)
Marvin Cai [Mon, 12 Sep 2022 10:50:21 +0000 (03:50 -0700)] 
Add option to clean up test ledger after simpletest. (#3474)

* Add option to clean up test ledger after simpletest.

Ledger created by simpletest could be trouble when decommissioning if
we set small esemble size, so add option to clean it up after test.
Also adding metadata to such test ledger so we can also manually clean it up later.

2 weeks agoFix the deadlock when only using io thread to handle request (#3480)
Yong Zhang [Mon, 12 Sep 2022 10:49:32 +0000 (18:49 +0800)] 
Fix the deadlock when only using io thread to handle request (#3480)

* Fix the deadlock when only using io thread to handle request
---

*Motivation*

If user don't configure the ReadWorker thread pool, the reqeust will
process with io thread. We cannot call await() from an IO thread,
if the socket buffer is full, that blocking call would cause a deadlock.

*Modification*

- only wait the promise when the thread is not io thread

* Fix the style issue

2 weeks agoBump netty version to 4.1.81.Final (#3481)
ZhangJian He [Mon, 12 Sep 2022 07:58:11 +0000 (15:58 +0800)] 
Bump netty version to 4.1.81.Final (#3481)

### Motivation
Netty 4.1.80 and Netty 4.1.81 solves several bugs

Changelog:
- https://netty.io/news/2022/08/26/4-1-80-Final.html
- https://netty.io/news/2022/09/08/4-1-81-Final.html

### Changes

* Upgrade Netty from 4.1.79.Final to 4.1.81.Final
* Netty 4.1.81.Final depends on netty-tc-native 2.0.54, also updates

2 weeks agoAdd missed call to onReadRequestFinish() when read request rejected (#3482)
Michael Marshall [Mon, 12 Sep 2022 06:57:08 +0000 (23:57 -0700)] 
Add missed call to onReadRequestFinish() when read request rejected (#3482)

Fixes: https://github.com/apache/bookkeeper/issues/2945

### Motivation

When a read request is rejected due to the limit on the number of reads that can be enqueued, we need to decrement the metric for `bookkeeper_server_READ_ENTRY_IN_PROGRESS` and release the `readsSemaphore`, if it is not null.

### Changes

* Call `onReadRequestFinish()` for failures in the V2 and V3 request processing logic.

### Observation
It looks like the V2 responses for this kind of failure are not throttled, even when `throttleReadResponses` is true. We could call `read.sendReadReqResponse(` to enable this throttling. I didn't change it here because there might be a reason we're not throttling these small responses.

2 weeks agooptimize SlowBookieTest (#3484)
ZhangJian He [Sun, 11 Sep 2022 13:12:08 +0000 (21:12 +0800)] 
optimize SlowBookieTest (#3484)

2 weeks agoBump netty version to 4.1.79.Final (#3479)
ZhangJian He [Fri, 9 Sep 2022 07:13:25 +0000 (15:13 +0800)] 
Bump netty version to 4.1.79.Final (#3479)

### Motivation
Netty 4.1.78 and Netty 4.1.79 solves several bugs

Changelog:
- https://netty.io/news/2022/06/14/4-1-78-Final.html
- https://netty.io/news/2022/07/11/4-1-79-Final.html

### Changes

* Upgrade Netty from 4.1.77.Final to 4.1.79.Final
* Netty 4.1.79.Final depends on netty-tc-native 2.0.53, also updates

### Why not directed upgraded to 4.1.80.Final
CI fails when upgraded to 4.1.80.Final. I'm still working on it. I think we can update to 4.1.79.Final first.

2 weeks agoclean code for BookKeeperServerStats (#3478)
HuangZeGui [Thu, 8 Sep 2022 01:25:00 +0000 (09:25 +0800)] 
clean code for BookKeeperServerStats (#3478)

### Motivation
clean code : remove unused fields in `org.apache.bookkeeper.bookie.BookKeeperServerStats`

2 weeks agoBump jcommander from 1.78 to 1.82 (#3476)
ZhangJian He [Wed, 7 Sep 2022 14:38:18 +0000 (22:38 +0800)] 
Bump jcommander from 1.78 to 1.82 (#3476)

### Motivation
That's a regular update, `jcommander` 1.78 was released in 2019.

### Modifications
Bump jcommander version from 1.78 to 1.82

2 weeks agoBump snakeyaml from 1.30 to 1.31 to solve CVE-2022-25857 (#3469)
ZhangJian He [Tue, 6 Sep 2022 23:50:35 +0000 (07:50 +0800)] 
Bump snakeyaml from 1.30 to 1.31 to solve CVE-2022-25857 (#3469)

2 weeks agoBump dependency check to 7.1.2 to avoid FP (#3470)
ZhangJian He [Tue, 6 Sep 2022 23:49:27 +0000 (07:49 +0800)] 
Bump dependency check to 7.1.2 to avoid FP (#3470)

3 weeks agoFeature: auto recover support repaired not adhering placement ledger (#3359)
Yan Zhao [Mon, 5 Sep 2022 08:13:36 +0000 (16:13 +0800)] 
Feature: auto recover support repaired not adhering placement ledger (#3359)

3 weeks agoOptimize log for failed to write entry (#3463)
Xiaoyu Hou [Mon, 5 Sep 2022 02:55:43 +0000 (10:55 +0800)] 
Optimize log for failed to write entry (#3463)

Descriptions of the changes in this PR:

Print bookie address when writing entry failed

### Motivation

Printing bookie info will be help for solving online problem
### Changes

Print bookie address when writing entry failed

3 weeks agoAdd powermock global configuration (#3467)
Lishen Yao [Mon, 5 Sep 2022 01:38:09 +0000 (09:38 +0800)] 
Add powermock global configuration (#3467)

### Motivation

Fix https://github.com/apache/bookkeeper/issues/3115

When I try to run some test classes, there will occur an error message like the above issue cause `javax/management/MBeanServer` is a system class and javassist's classloader cannot load it. we can add powermock global configuration to ignore this error message.

The powermock's instruction is here: https://github.com/powermock/powermock/wiki/PowerMock-Configuration

### Changes

Add `org/powermock/extensions/configuration.properties`.

3 weeks agoAdd 4.15.1 release note (#3440)
Yong Zhang [Fri, 2 Sep 2022 02:15:28 +0000 (10:15 +0800)] 
Add 4.15.1 release note (#3440)

* Add 4.15.1 release note
---

*Motivation*

Generates the 4.15.1 docs and release note

3 weeks agoSkip runs the workflow when only have site related changes (#3462)
Yong Zhang [Thu, 1 Sep 2022 07:03:47 +0000 (15:03 +0800)] 
Skip runs the workflow when only have site related changes (#3462)

---

*Motivation*

We have enabled the requirement of the workflow before merging a
PR. We should skip checking the sites related changes because they
are non-code change.

*Modification*

- Using apache/pulsar-test-infra/paths-filter@master to filter the files

3 weeks ago[BOOKIE-SHELL]fix queryautorecoverystatus command (#3459) (#3460)
赤月 [Wed, 31 Aug 2022 01:38:16 +0000 (09:38 +0800)] 
[BOOKIE-SHELL]fix queryautorecoverystatus command (#3459) (#3460)

### Motivation

bugfix

### Changes

Fix CMD_QUERY_AUTORECOVERY_STATUS command about registering to BOOKIE_SHEEL command mapping

Master Issue: #3459

4 weeks ago[ci] Cache maven dependencies (#3461)
Nicolò Boschi [Mon, 29 Aug 2022 16:18:48 +0000 (18:18 +0200)] 
[ci] Cache maven dependencies (#3461)

### Motivation
Our current CI doesn't implement a cache solution and it's a waste of resources and time.
GH offers a builtin action
https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows

### Changes

* Added a cache for each job that build with maven

4 weeks agoMake netty acceptor threadPool size configurable (#3153)
grayson [Thu, 25 Aug 2022 06:44:32 +0000 (14:44 +0800)] 
Make netty acceptor threadPool size configurable (#3153)

4 weeks agomove forceWriteMarkerSent out of loop of ForceWriteThread to avoid frequently forceWr...
yapeng [Wed, 24 Aug 2022 00:25:58 +0000 (08:25 +0800)] 
move forceWriteMarkerSent out of loop of ForceWriteThread to avoid frequently forceWrite (#3454)

Fix group ForceWrite not take effect with forceWriteMarkerSent in while loop of ForceWriteThread

### Motivation
Bookkeeper 4.15 has performance issue. There are too many journal sync.
Then I found in ForceWriteThread, forceWriteMarkerSent is reset to false for every loop, and this can cause shouldForceWrite=true and trigger journal sync. This new logic is bringed by https://github.com/apache/bookkeeper/pull/2962

### Changes
move forceWriteMarkerSent=false out of while loop.

5 weeks agorequired_approving_review_count update (#3453)
StevenLuMT [Tue, 23 Aug 2022 06:30:34 +0000 (14:30 +0800)] 
required_approving_review_count update (#3453)

Co-authored-by: lushiji <lushiji@didiglobal.com>
5 weeks agoWriteLacResponse should be processed in the same thread as other requ… (#3452)
karanmehta93 [Sun, 21 Aug 2022 06:46:14 +0000 (23:46 -0700)] 
WriteLacResponse should be processed in the same thread as other requ… (#3452)

* WriteLacResponse should be processed in the same thread as other requests for same ledgerId

In PCBC code, the WriteLacCompletion object uses LAC as the key for selecting the thread in which the response
will be processed. However, according to bookkeeper code guarantees, the thread should be decided based on hash of ledgerId.

* Empty-Commit

5 weeks agobugfix for .asf.yaml (#3451)
StevenLuMT [Sat, 20 Aug 2022 04:02:16 +0000 (12:02 +0800)] 
bugfix for .asf.yaml (#3451)

Descriptions of the changes in this PR:

### Motivation

using [.asf.yaml](https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-Branchprotection) to configure the project,
but there 's some config bugfix for project's .asf.yaml
the name of workflow's jobs is not set, so #3439 causes contexts can't match check's jobs

this picture is the other new add pr's running result: the other pr's workflow run abnormally
<img width="923" alt="image" src="https://user-images.githubusercontent.com/42990025/185718866-b7054dd7-502f-4371-8906-c43f8b1b166b.png">

this picture is current running result: current pr is running normally because the job name is added in yaml file
<img width="954" alt="image" src="https://user-images.githubusercontent.com/42990025/185718710-ec41584e-4871-40cc-9ed6-655caa7ff021.png">

### Changes

1.  add the name for checks
2. change required_approving_review_count to 2 person
3. update README.md for workflows

5 weeks agoAdd .asf.yaml for configuring the project (#3439)
Yong Zhang [Fri, 19 Aug 2022 16:45:59 +0000 (00:45 +0800)] 
Add .asf.yaml for configuring the project (#3439)

---

*Motivation*

Same as Pulsar, Pulsar is using [.asf.yaml](https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-Branchprotection) to configure the project,
like the branch protection.
Add .asf.yaml for configuring the PR required CI.

5 weeks agoFix wrong stats name (#3450)
Hang Chen [Fri, 19 Aug 2022 13:52:34 +0000 (21:52 +0800)] 
Fix wrong stats name (#3450)

### Modification
Fix the wrong `cbThreadPoolQueueSize` doc name

5 weeks agoFix the tls failed test (#3448)
Yong Zhang [Thu, 18 Aug 2022 11:34:48 +0000 (19:34 +0800)] 
Fix the tls failed test (#3448)

---

*Motivation*

When runing the tls test, the remote address is a LocalAddress,
but we cast it to the `InetSocketAddress`. That cause the test
`testConnectToLocalTLSClusterTLSClient` failed.

6 weeks agoAdd latency stats for entry location index lookup so that possible RocksDB bottleneck...
Lari Hotari [Tue, 16 Aug 2022 10:46:33 +0000 (13:46 +0300)] 
Add latency stats for entry location index lookup so that possible RocksDB bottleneck can be detected (#3444)

* Add operation latency stats for entry location lookup

- this metric will help detecting when the bottleneck is in the entry location index lookup operations
  and RocksDB tuning is needed

* Address review feedback: fix issue with eventLatencyMillis variable

* Rename misleading parameter name

7 weeks agoBump vertx version from 3.9.8 to 4.3.2 (#3435)
ZhangJian He [Sun, 7 Aug 2022 14:09:36 +0000 (22:09 +0800)] 
Bump vertx version from 3.9.8 to 4.3.2 (#3435)

8 weeks agoRevert some unwanted changes in commit 3309 (#3438)
Yong Zhang [Tue, 2 Aug 2022 05:36:35 +0000 (13:36 +0800)] 
Revert some unwanted changes in commit 3309 (#3438)

---

*Motivation*

There are some unwanted changes committed by 3309
https://github.com/apache/bookkeeper/pull/3309

8 weeks agoBump terser from 5.12.0 to 5.14.2 in /site3/website (#3414)
dependabot[bot] [Mon, 1 Aug 2022 13:54:46 +0000 (21:54 +0800)] 
Bump terser from 5.12.0 to 5.14.2 in /site3/website (#3414)

Bumps [terser](https://github.com/terser/terser) from 5.12.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8 weeks agoBump version for release 4.16 (#3436)
Hang Chen [Mon, 1 Aug 2022 13:53:56 +0000 (21:53 +0800)] 
Bump version for release 4.16 (#3436)

### Descriptions of the changes in this PR:

Updated py client's version to 4.16

### Motivation

Preparing for the release
https://bookkeeper.apache.org/community/release_guide/#change-python-client-version

8 weeks agoIssue #2908: Replace unsafe NoEntryException with IOException (#2909)
Jack Vanlightly [Mon, 1 Aug 2022 07:11:35 +0000 (09:11 +0200)] 
Issue #2908: Replace unsafe NoEntryException with IOException (#2909)

* Replace unsafe NoEntryException with IOException

Throwing a NoEntryException from the entry logger
for an entry that the index says should exist is
unsafe. It can cause ledger truncation during ledger
recovery. It only takes a single false NoSuchEntry
response to trigger truncation.

NoEntryException should only be thrown from inside
ledger storage if the entry is not found in the index.

* fix CI

Co-authored-by: chenhang <chenhang@apache.org>
8 weeks agoBP-41 Add flag to enable/disable BookieAddressResolver (#3356)
Masahiro Sakamoto [Sun, 31 Jul 2022 07:12:06 +0000 (16:12 +0900)] 
BP-41 Add flag to enable/disable BookieAddressResolver (#3356)

### Motivation

With BP-41, the BookKeeper client now needs a request to ZooKeeper to resolve the address from each bookie ID.

In the following document, there is a description of the flag ~`enableBookieAddressResolver`~ `bookieAddressResolverEnabled` for disabling this feature by regarding the bookie ID as an address or hostname, but it seems that this has not been implemented yet.
https://github.com/apache/bookkeeper/blob/master/site3/website/src/pages/bps/BP-41-bookieid.md

I implemented this because I want this flag to reduce the number of requests to ZK.

### Changes

Added a flag named ~`enableBookieAddressResolver`~ `bookieAddressResolverEnabled` to the client configuration. If this flag is false, use `BookieAddressResolverDisabled` instead of `DefaultBookieAddressResolver` as the address resolver for bookies. `BookieAddressResolverDisabled` regards a bookie ID to be in legacy format, i.e. "address:port" or "hostname:port", and returns the address of that bookie without access to ZK.

Master Issue: #2396

8 weeks agoindexDir compatible fix for issue #3430 (#3433)
StevenLuMT [Sun, 31 Jul 2022 04:07:21 +0000 (12:07 +0800)] 
indexDir compatible fix for issue #3430 (#3433)

Descriptions of the changes in this PR:

### Motivation
Fixes https://github.com/apache/bookkeeper/issues/3430, make cookie validation is compatible with old version.
I think we should check indexDirs when configuration‘s indexDirectories is setted  rather than avoiding the check

### Changes
1. add compatible check
2. add testcase to cover the new code

8 weeks agoissue #2879 : let bookie quit if journal thread exit (#2887)
AloysZhang [Sun, 31 Jul 2022 03:30:45 +0000 (11:30 +0800)] 
issue #2879 : let bookie quit if journal thread exit (#2887)

Descriptions of the changes in this PR:
fix #2879
This pull request let bookie quit when there's journal thread exit

### Motivation

As described in #2879, now if a bookie has multi journal directories means it has multi journal thread. Once a journal thread exits, the bookie will be unhealthy due to the block of all bookie-io threads, and then the bookie will not work but progress is still alive.
This pull request tries to fix this problem.

### Changes

check the journal thread alive in a fixed interval, let bookie quit once there's a journal thread exit

8 weeks agoupgrade log4j2 to 2.18.0 (#3434)
Hang Chen [Sat, 30 Jul 2022 15:38:29 +0000 (23:38 +0800)] 
upgrade log4j2 to 2.18.0 (#3434)

### Modification
Upgrade log4j2 from 2.17.2 to 2.18.0

8 weeks agoBump puppycrawl checkstyle version from 7.8.2 to 9.3 (#3311)
ZhangJian He [Fri, 29 Jul 2022 13:12:53 +0000 (21:12 +0800)] 
Bump puppycrawl checkstyle version from 7.8.2 to 9.3 (#3311)

### Changes
- Bump puppycrawl checkstyle version from 6.19 to 10.3
- adapt the `static import, SPACE LINE, import` order

### why so many files are changed
Former checkstyle config is not strict, we have different importOrder styles in code. Most of it (2100+) is `static import, SPACE LINE, import`. Others(366) only needs to remove or add space line.

8 weeks ago[conf] minorCompactionInterval should be greater than gcWaitTime (#2116)
Penghui Li [Fri, 29 Jul 2022 12:11:21 +0000 (20:11 +0800)] 
[conf] minorCompactionInterval should be greater than gcWaitTime (#2116)

8 weeks ago[ISSUE 2637] Fix jvm_memory_direct_bytes_used metrics when using jdk11+ (#3252)
ZhangJian He [Fri, 29 Jul 2022 10:38:27 +0000 (18:38 +0800)] 
[ISSUE 2637] Fix jvm_memory_direct_bytes_used metrics when using jdk11+ (#3252)

Fix #2637 #3247

### Motivation
The mertics about `jvm_memory_direct_bytes_used` is acquired by netty's `PlatformDependent#DIRECT_MEMORY_COUNTER`. Which can only acquired the memory used by netty.

### Changes
- use `java.nio.Bits#RESERVED_MEMORY` for jvm direct memory metrics.
- add tests to ensure `jvm_memory_direct_bytes_max` and `jvm_memory_direct_bytes_used` gets value.

8 weeks agoadd metric cbThreadPoolQueueSize (#3424)
LinChen [Fri, 29 Jul 2022 07:30:20 +0000 (15:30 +0800)] 
add metric cbThreadPoolQueueSize (#3424)

### Motivation
Add a new metric cbThreadPoolQueueSize to count the queue size in the thread pool cbThreadPool.

8 weeks agofix Flaky-test: testBookieShouldTurnWritableFromReadOnly (#3423)
wenbingshen [Fri, 29 Jul 2022 07:22:59 +0000 (15:22 +0800)] 
fix Flaky-test: testBookieShouldTurnWritableFromReadOnly (#3423)

### Motivation
Fixes issue #3422

1.`waitForReadOnlyBookie` adds another `listener` thread to observe the node status of bookie, which may be out of sync with the triggering of node changes(`onClusterChanged`) in `EnsemblePlacementPolicy`.This `sequence` leads to flaky test.

2.Expose bookie nodes in EnsemblePlacementPolicy to client.

3.Just change from watching zk to thread sleep.

We currently don't have any additional requirements for getting bookie nodes on the client side, so it's better to just use thread sleep here.

### Changes
Change from `waitForReadOnlyBookie` and `waitForWritableBookie` to thread `sleep`.
3 seconds is enough for most.

8 weeks agoMake sure the LedgerHandle close callback can be completed when encounter exception...
Penghui Li [Fri, 29 Jul 2022 06:56:48 +0000 (14:56 +0800)] 
Make sure the LedgerHandle close callback can be completed when encounter exception (#2913)

* Make sure the LedgerHandle close callback can be completed when encounter exception.

2 months agoBump puppycrawl checkstyle version from 6.19 to 7.8.2 (#3425)
ZhangJian He [Fri, 29 Jul 2022 01:30:47 +0000 (09:30 +0800)] 
Bump puppycrawl checkstyle version from 6.19 to 7.8.2 (#3425)

### Changes
Bump puppycrawl checkstyle version to 7.8.2. Fix violation

2 months agoFix the infinite waiting for shutdown due to throttler limit (#2942)
wenbingshen [Thu, 28 Jul 2022 03:41:52 +0000 (11:41 +0800)] 
Fix the infinite waiting for shutdown due to throttler limit (#2942)

Descriptions of the changes in this PR:
### Motivation

If the compactor is limited, the shutdown priority should be higher than waiting for RateLimiter.acquire.

### Changes

According to @hangc0276 suggestion, when processing the shutdown logic of `GarbageCollectorThread`, we should check the status of the `newScanner.process` method. If the status is false, throw an `IOException` and stop compact immediately.

Master Issue: #2941

2 months agoFix wrong ledger id parse radix for index relocation file in IndexPersistenceMgr...
Kezhu Wang [Thu, 28 Jul 2022 02:07:03 +0000 (10:07 +0800)] 
Fix wrong ledger id parse radix for index relocation file in IndexPersistenceMgr (#2944)

Descriptions of the changes in this PR:

### Motivation
1. `IndexPersistenceMgr` fails to start after crashing index file movement.

### Changes
1. Add test to assert index file relocation
2. Fix wrong ledger id parse radix for index relocation file in IndexPersistenceMgr

Master Issue: None

2 months agofix check style (#3429)
Hang Chen [Thu, 28 Jul 2022 01:33:35 +0000 (09:33 +0800)] 
fix check style (#3429)

### Modification
The CI failed witch check style, fix it.
https://github.com/apache/bookkeeper/runs/7544140069?check_suite_focus=true

2 months agoupdate ALLOCATOR_POOLING_CONCURRENCY default value (#3001)
ssj [Wed, 27 Jul 2022 15:57:48 +0000 (23:57 +0800)] 
update ALLOCATOR_POOLING_CONCURRENCY default value (#3001)

Set a more reasonable default value to avoid OutOfDirectMemoryError.

Descriptions of the changes in this PR:

### Motivation
The default value of  allocatorPoolingConcurrency is 2 * Runtime.getRuntime().availableProcessors(). It's used to specify the num of Arena in PooledByteBufAllocator.

Assume:
40 processors
80 arena (processors*2)
2 chunk per arena
16MiB per chunk
JVM's total direct mem should be larger then 80*2*16=2560MiB, otherwise OutOfDirectMemoryError occured.

OutOfDirectMemoryError much more likely to occur in Docker, cause JDK versions earlier than Java SE 8U131 does not support Docker CPU limits.

### Changes
Use Netty default arena num `PooledByteBufAllocator.defaultNumDirectArena()` as default allocatorPoolingConcurrency.

2 months ago[improve][client] release the bookie from QuarantinedBookies when health check is...
lixinyang [Wed, 27 Jul 2022 15:52:10 +0000 (23:52 +0800)] 
[improve][client] release the bookie from QuarantinedBookies when health check is disabled (#3349)

### Motivation
we need release all quarantined bookies when we use the dynamic config to disable the health check. In some case, we disable the health check when the client has add all bookies to `quarantinedBookies`, then we want to recovery all client's read/write capability immediately.
But now we need wait `BOOKIE_QUARANTINE_TIME_SECONDS` reached or we need restart all client, it's too slowly to recovery the client read/write for us.

### Changes
Release all `QuarantinedBookies`,  after we dynamic disable the  health check.

2 months agoPre break loop when self create layoutZNode succeed. (#3335)
Yan Zhao [Wed, 27 Jul 2022 11:09:07 +0000 (19:09 +0800)] 
Pre break loop when self create layoutZNode succeed. (#3335)

Pre break loop when self create layoutZNode succeed.

2 months agoBP-50: Add reuse journal file feature to support Intel PMem disk (#3194)
Hang Chen [Wed, 27 Jul 2022 11:04:21 +0000 (19:04 +0800)] 
BP-50: Add reuse journal file feature to support Intel PMem disk (#3194)

### Motivation
The implementation of #3193

2 months agoFix typo in bookkeeper-proposals.md (#3427)
ZhangJian He [Wed, 27 Jul 2022 07:03:52 +0000 (15:03 +0800)] 
Fix typo in bookkeeper-proposals.md (#3427)

2 months agoFix the 3141 revert issue (#3283)
xiaolong ran [Tue, 26 Jul 2022 15:22:07 +0000 (23:22 +0800)] 
Fix the 3141 revert issue (#3283)

Signed-off-by: xiaolongran <xiaolongran@tencent.com>
### Motivation

In #3144, we reverted the changes of #2686, but after the revert, the self-increment behavior of deletedEntries was also removed, resulting in deletedEntries No assignment, always 0.

In #2686

<img width="1501" alt="image" src="https://user-images.githubusercontent.com/20965307/169231903-1a0bee03-f602-4c61-9c98-6b832f75648f.png">

In #3144

<img width="1352" alt="image" src="https://user-images.githubusercontent.com/20965307/169232028-658a1182-d8c5-4cfa-8f39-2ed7416ee508.png">

### Changes

- Add `++deletedEntries` for removeOffsetFromDeletedLedgers.

2 months agoRemove useless and duplicated ledger directory usage metric (#3156)
萧易客 [Tue, 26 Jul 2022 13:38:27 +0000 (21:38 +0800)] 
Remove useless and duplicated ledger directory usage metric (#3156)

### Motivation

The disk usage metric and the number of writable directories about ledger directories is duplicated cause `LedgerDirsManager` was created with same ledgerDir more than once, here it is:
1. with `bookie_ledger` scope
https://github.com/apache/bookkeeper/blob/38dc3281f5f175a7d194d4c0d4b255472886187b/bookkeeper-server/src/main/java/org/apache/bookkeeper/server/Main.java#L365-L366
- `bookie_ledger_dir_<ledger directory>_usage`
- `bookie_ledger_writable_dirs`

2. with `bookie` score
https://github.com/apache/bookkeeper/blob/38dc3281f5f175a7d194d4c0d4b255472886187b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorage.java#L155
- `bookie_dir_<ledger directory>_usage`
- `bookie_writable_dirs`

The second one wasn't bind with a `DiskChecker`, so it's metric never changes.

### Changes

Remove second one, remove metrics below:
- `bookie_dir_<ledger directory>_usage`
- `bookie_writable_dirs`

2 months agoOptimize concurrent collection's shrink logic (#3417)
wenbingshen [Tue, 26 Jul 2022 12:39:50 +0000 (20:39 +0800)] 
Optimize concurrent collection's shrink logic (#3417)

### Motivation

Optimize concurrent collection's shrink and clear logic

### Changes
1. Reduce the repeated `Arrays.fill` in the clear process
2. When `capacity` is already equal to `initCapacity`,`rehash` should not be executed
3. Reduce the `rehash` logic in the `clear` process
4. Shrinking must at least ensure `initCapacity`, so as to avoid frequent shrinking and expansion near `initCapacity`, frequent shrinking and expansion, additionally opened `arrays` will consume more memory and affect GC.

If this PR is accepted, I will optimize the same `concurrent collection's shrink and clear logic ` defined in pulsar.

Related to #3061 and #3074

2 months agoConsolidate Netty channel flushes to mitigate syscall overhead (#3383)
Matteo Merli [Tue, 26 Jul 2022 09:34:01 +0000 (02:34 -0700)] 
Consolidate Netty channel flushes to mitigate syscall overhead (#3383)

2 months agoFix autoRecover memory leak. (#3361)
Yan Zhao [Tue, 26 Jul 2022 09:32:40 +0000 (17:32 +0800)] 
Fix autoRecover memory leak. (#3361)

2 months agovalidate diskUsageThreshold and diskUsageLwmThreshold (#3285)
wenbingshen [Tue, 26 Jul 2022 09:24:18 +0000 (17:24 +0800)] 
validate diskUsageThreshold and diskUsageLwmThreshold (#3285)

### Motivation

When `diskUsageThreshold < diskUsageLwmThreshold`, the bookie can be started normally. When the disk usage reaches `diskUsageThreshold` , bookie will automatically switch to `ReadOnly` mode. The `LedgerDirsMonitor` then switches the bookie back to  `read-write` mode since the disk usage is less than `diskUsageLwmThreshold`, the bookie will switch state back and forth frequently.

### Changes
When creating `LedgerDirsMonitor`, we need to validate `diskUsageThreshold` and `diskUsageLwmThreshold` first.

2 months agoavoid init WriteSet when waitForWriteSetMs < 0. (#3325)
Yan Zhao [Tue, 26 Jul 2022 09:18:16 +0000 (17:18 +0800)] 
avoid init WriteSet when waitForWriteSetMs < 0. (#3325)

### Motivation
Avoid init WriteSet when waitForWriteSetMs < 0.
And LedgerHandleAdv didn't recycle WriteSet.

2 months agofix underReplicatedLedgerTotalSize calculate problem. (#3337)
Yan Zhao [Tue, 26 Jul 2022 05:28:34 +0000 (13:28 +0800)] 
fix underReplicatedLedgerTotalSize calculate problem. (#3337)

Descriptions of the changes in this PR:
```
  LongAdder underReplicatedSize = new LongAdder();
        FutureUtils.processList(
                Lists.newArrayList(ledgers),
                ledgerId ->
                    ledgerManager.readLedgerMetadata(ledgerId).whenComplete((metadata, exception) -> {
                        if (exception == null) {
                            underReplicatedSize.add(metadata.getValue().getLength());
                        }
                    }), null);
        underReplicatedLedgerTotalSize.registerSuccessfulValue(underReplicatedSize.longValue());
```
`FutureUtils.processList`  is async process, should record `underReplicatedLedgerTotalSize` when it completed.

2 months agoStable testBookieContinueWritingIfMultipleLedgersPresent test (#3421)
wenbingshen [Tue, 26 Jul 2022 03:34:27 +0000 (11:34 +0800)] 
Stable testBookieContinueWritingIfMultipleLedgersPresent test (#3421)

### Motivation

Fixes issue #2665

When the disk is full, `InterleavedLedgerStorage` creates a new entryLog and index file, copies and moves the old index (newFile) `FileInfo` to the new directory, and finally deletes the old index file.

The old file of `FileInfo` was `deleted`, but it was copied and moved a newFile to the new directory. Therefore, the delete status flag should be restored. If it is not set to false,`checkOpen` will throw `FileInfoDeletedException` when judging the fence status of `ledgerHandle` when adding an entry, causing the writing to fail. When the client changes the `ensemble`, it throws an exception because the test has only two bookie nodes and cannot satisfy the two writeSet: `Not enough non-faulty bookies available`.
```java
    public synchronized boolean isFenced() throws IOException {
        checkOpen(false);
        return (stateBits & STATE_FENCED_BIT) == STATE_FENCED_BIT;
    }

    private synchronized void checkOpen(boolean create, boolean openBeforeClose)
            throws IOException {
        if (deleted) {
            throw new FileInfoDeletedException();
        }
      .....
    }
```

### Changes
When `FileInfo` moves to a new directory by `moveToNewLocation`,delete the old index file and restore the `delete` flag, because the new index file is ready.

Set the disk check interval to the `Integer.MAX_VALUE`, which is stable
`assertEquals("writable dirs should have one dir", 1, ledgerDirsManager
                .getWritableLedgerDirs().size());`
Because once the test thrashes, the disk check thread will restore the full disk to a writable state.
```java
newConf.setDiskCheckInterval(Integer.MAX_VALUE);
```

2 months agoenhance future sync wait. (#3336)
Yan Zhao [Tue, 26 Jul 2022 01:38:35 +0000 (09:38 +0800)] 
enhance future sync wait. (#3336)

Descriptions of the changes in this PR:

Enhance future sync wait.
The same logicment:
https://github.com/apache/bookkeeper/blob/f887f8d7a507800b71b4143a40b0e45902f5f170/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/SyncCallbackUtils.java#L45-L71

2 months agoIf ensembleList is empty, return PlacementPolicyAdherence.FAIL. (#3369)
Yan Zhao [Tue, 26 Jul 2022 01:17:26 +0000 (09:17 +0800)] 
If ensembleList is empty, return PlacementPolicyAdherence.FAIL. (#3369)

Descriptions of the changes in this PR:
If the ensembleList is empty, should not return PlacementPolicyAdherence.MEETS_STRICT.
Return PlacementPolicyAdherence.FAIL to remind user.

2 months ago[Issue 3389] Prioritize compaction of entry logs with the lowest amount of remaining...
Andrey Yegorov [Fri, 22 Jul 2022 23:51:01 +0000 (16:51 -0700)] 
[Issue 3389] Prioritize compaction of entry logs with the lowest amount of remaining usable data (#3390)

Descriptions of the changes in this PR:

### Motivation

Prioritize compaction to free up more space faster.

### Changes

doCompactEntryLogs() iterates over entry logs in whatever natural order they happen to be, picks the first with usage below thresholds and starts compacting.

Added a Priority Queue of entry logs to pick ones with the most compactable space first; it also helps when the time for compaction is limited (via majorCompactionMaxTimeMillis / minorCompactionMaxTimeMillis), instead of spending time on rewriting files with more data we'll pick the files with the least amount of data first.

Master Issue: #3389

2 months agouse LinkedList to take place of ArrayList. (#3330)
Yan Zhao [Fri, 22 Jul 2022 17:01:40 +0000 (01:01 +0800)] 
use LinkedList to take place of ArrayList. (#3330)

2 months agoAdded flag to control whether to transition to read-only mode when any disks full...
Hang Chen [Fri, 22 Jul 2022 16:59:42 +0000 (00:59 +0800)] 
Added flag to control whether to transition to read-only mode when any disks full (#3212)

* Added flag to control whether to transition to read-only mode when any disk is full

* add unit test

* address comments

* add docs and config in conf/bk_server.conf

2 months agoSwitch back ordered executor to LinkedBlockingQueue (#3384)
Matteo Merli [Fri, 22 Jul 2022 16:50:56 +0000 (09:50 -0700)] 
Switch back ordered executor to LinkedBlockingQueue (#3384)

2 months agoIssue 3206: Flaky-test: BookieZKExpireTest.testBookieServerZKExpireBehaviour (#3415)
Andrey Yegorov [Thu, 21 Jul 2022 09:35:30 +0000 (02:35 -0700)] 
Issue 3206: Flaky-test: BookieZKExpireTest.testBookieServerZKExpireBehaviour (#3415)

* Issue 3206: Flaky-test: BookieZKExpireTest.testBookieServerZKExpireBehaviour

* clear property at the end of the test

2 months ago[website] Remove alert for non mantained releases (#3411)
Nicolò Boschi [Tue, 19 Jul 2022 21:58:56 +0000 (23:58 +0200)] 
[website] Remove alert for non mantained releases (#3411)

2 months agostage 10: bugfix indexDirs for ConvertToInterleavedStorageCommand (#3409)
StevenLuMT [Tue, 19 Jul 2022 07:11:14 +0000 (15:11 +0800)] 
stage 10: bugfix indexDirs for ConvertToInterleavedStorageCommand (#3409)

Co-authored-by: lushiji <lushiji@didiglobal.com>
2 months agoFix JVM exited when running localbookie with jdk17 (#3334)
weiping-code [Mon, 18 Jul 2022 08:22:25 +0000 (16:22 +0800)] 
Fix JVM exited when running localbookie with jdk17 (#3334)

Co-authored-by: ZhangJian He <shoothzj@gmail.com>
2 months agoRename bookkeeper metrics to specify OpenMetrics (#3406)
ZhangJian He [Sat, 16 Jul 2022 01:23:34 +0000 (09:23 +0800)] 
Rename bookkeeper metrics to specify OpenMetrics (#3406)

### Motivation
See https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md
A COUNTER needs `metrics_name_total` or `metrics_name_created`

This PR contains metric name broken changes.

### Modifications
Rename counter's `_count` to `_total`

### metrics name broken changes
- rename `FAILED_TO_RESOLVE_NETWORK_LOCATION_COUNTER` to `FAILED_TO_RESOLVE_NETWORK_LOCATION_TOTAL`
- rename `ENSEMBLE_NOT_ADHERING_TO_PLACEMENT_POLICY_COUNT` to `ENSEMBLE_NOT_ADHERING_TO_PLACEMENT_POLICY_TOTAL`
- rename `ACTIVE_ENTRY_LOG_COUNT` to `ACTIVE_ENTRY_LOG_TOTAL`
- rename `MAJOR_COMPACTION_COUNT` to `MAJOR_COMPACTION_TOTAL`
- rename `MINOR_COMPACTION_COUNT` to `MINOR_COMPACTION_TOTAL`
- rename `ACTIVE_LEDGER_COUNT` to `ACTIVE_LEDGER_TOTAL`
- rename `DELETED_LEDGER_COUNT` to `DELETED_LEDGER_TOTAL`
- rename `JOURNAL_FORCE_WRITE_GROUPING_COUNT` to `JOURNAL_FORCE_WRITE_GROUPING_TOTAL`

### Also see
- https://github.com/apache/pulsar/pull/13785
- https://github.com/apache/pulsar/pull/16591
- https://github.com/apache/pulsar/pull/16610
- https://github.com/apache/pulsar/pull/16611

2 months agostage 9: bugfix indexDirs for LedgersIndexRebuildOp (#3403)
StevenLuMT [Fri, 15 Jul 2022 07:17:38 +0000 (15:17 +0800)] 
stage 9: bugfix indexDirs for LedgersIndexRebuildOp (#3403)

Co-authored-by: lushiji <lushiji@didiglobal.com>
2 months agostage 8: bugfix indexDirs for LedgersIndexCheckOp (#3402)
StevenLuMT [Fri, 15 Jul 2022 07:17:11 +0000 (15:17 +0800)] 
stage 8: bugfix indexDirs for LedgersIndexCheckOp (#3402)

Co-authored-by: lushiji <lushiji@didiglobal.com>
2 months agostage 7: just add log for indexDirs (#3401)
StevenLuMT [Fri, 15 Jul 2022 07:16:57 +0000 (15:16 +0800)] 
stage 7: just add log for indexDirs (#3401)

Co-authored-by: lushiji <lushiji@didiglobal.com>
2 months agoadd writeThreadQueuedLatency (#3363)
LinChen [Thu, 14 Jul 2022 15:01:35 +0000 (23:01 +0800)] 
add writeThreadQueuedLatency (#3363)

### Motivation
add writeThreadQueueStats :  calculate the time the request stays in the write threadpool queue

2 months ago[security] Upgrade Jetty to 9.4.48.v20220622 to get rid of CVE-2022-2047 (#3404)
Nicolò Boschi [Thu, 14 Jul 2022 06:10:00 +0000 (08:10 +0200)] 
[security] Upgrade Jetty to 9.4.48.v20220622 to get rid of CVE-2022-2047 (#3404)

2 months agoMake BookieFileChannel interface public (#3396)
Hang Chen [Wed, 13 Jul 2022 14:39:13 +0000 (22:39 +0800)] 
Make BookieFileChannel interface public (#3396)

### Motivation
The `BookieFileChannel` is package public, and can't be implemented out of the `org.apache.bookkeeper.bookie` package.
We should make it public

### Modification
Make `BookieFileChannel` and `DefaultFileChannel` public

2 months agoAdd static declaration for useFallocate in DirectWriter (#3388)
wenbingshen [Wed, 13 Jul 2022 14:37:27 +0000 (22:37 +0800)] 
Add static declaration for useFallocate in DirectWriter (#3388)

### Motivation

The work of the `BP-47` has been very meaningful. I am reading and learning it.

As the title, `useFallocate` in `DirectWriter` has no practical meaning, because the judgment of SystemUtils.IS_OS_LINUX always happens.

2 months agoUpgrading JNA from 3.2.7 to 5.12.1 (#3400)
Andrey Yegorov [Wed, 13 Jul 2022 02:46:48 +0000 (19:46 -0700)] 
Upgrading JNA from 3.2.7 to 5.12.1 (#3400)

Descriptions of the changes in this PR:

### Motivation

Upgrading JNA

### Changes

changed dependency version

Master Issue: #3394

2 months agostage 5: bugfix indexDirs for readLedgerIndexEntries (#3398)
StevenLuMT [Wed, 13 Jul 2022 02:45:47 +0000 (10:45 +0800)] 
stage 5: bugfix indexDirs for readLedgerIndexEntries (#3398)

Descriptions of the changes in this PR:

### Motivation

planning for index dir: [mail talking](https://lists.apache.org/thread/r657jf55khl59bbqltj2s95107lbkr0w)
stage 5 :
1)  fix indexDirs for EntryLocationIndex's tool

### Changes

1.  bugfix indexDirs for EntryLocationIndex's tool
2. add index's testcase for testReadLedgerIndexEntries
3. bugfix findexDirs for TestBase

2 months agoShut down ReplicationWorker and Auditor on non-recoverable ZK error (#3374)
Andrey Yegorov [Tue, 12 Jul 2022 14:57:19 +0000 (07:57 -0700)] 
Shut down ReplicationWorker and Auditor on non-recoverable ZK error (#3374)

2 months agostage 6: bugfix indexDirs for LocationsIndexRebuildOp (#3399)
StevenLuMT [Tue, 12 Jul 2022 07:47:48 +0000 (15:47 +0800)] 
stage 6: bugfix indexDirs for LocationsIndexRebuildOp (#3399)

Co-authored-by: lushiji <lushiji@didiglobal.com>
2 months agoclean code: remove unused JOURNAL_NUM_FORCE_WRITES (#3379)
LinChen [Tue, 12 Jul 2022 00:12:46 +0000 (08:12 +0800)] 
clean code: remove unused JOURNAL_NUM_FORCE_WRITES (#3379)

### Motivation
clean code: remove unused JOURNAL_NUM_FORCE_WRITES

2 months agostage 2.3 ~ 2.4: (#3397)
StevenLuMT [Mon, 11 Jul 2022 22:58:38 +0000 (06:58 +0800)] 
stage 2.3 ~ 2.4: (#3397)

Descriptions of the changes in this PR:

### Motivation

planning for index dir: [mail talking](https://lists.apache.org/thread/r657jf55khl59bbqltj2s95107lbkr0w)
stage 3~4 :
1) disk monitor(DiskChecker/LedgerDirsMonitor) have checked indexDir,it's good;
2) add indexDirs in statsLogger, and add indexDirs's Listener.

### Changes

1. add indexDirs in statsLogger, and add indexDirs's Listener.
2. update index's testcase for SingleDirectoryDbLedgerStorage

2 months agoRemove gradle usage from Javadoc gen script (#3386)
Nicolò Boschi [Thu, 7 Jul 2022 23:54:28 +0000 (01:54 +0200)] 
Remove gradle usage from Javadoc gen script (#3386)

### Motivation

`javadoc-gen.sh` still uses Gradle for master branch.

### Changes

- Remove gradle and always use maven

Failure check: https://github.com/apache/bookkeeper/runs/7211295355?check_suite_focus=true

2 months agoMetrics: add journalCbQueueLatency (#3364)
LinChen [Thu, 7 Jul 2022 07:52:00 +0000 (15:52 +0800)] 
Metrics: add journalCbQueueLatency (#3364)

2 months agoFix dead link and add CI check (#3269)
Kirs [Wed, 6 Jul 2022 11:18:24 +0000 (19:18 +0800)] 
Fix dead link and add CI check (#3269)

* Fix dead link and add CI check

* fix dead link
exclude license checks for json files

* Run CI when only md files have been modified

* fix dead link

* fix dead link

* Ignore some link checks

* Ignore some link checks

* Ignore some link checks

* Ignore some link checks

* fix link checks

* ignore some links check

* ignore some links check

* ignore some links check

* fix dead link

* fix dead link

* fix dead link

* ignore some link

* fix deadlink

* ignore some unknown link

* ignore some unknown link

* ignore some unknown link

* ignore some unknown link

* ignore some unknown link

* ignore some unknown link

* ignore some unknown link

* ignore some unknown link

* fix dead link

* fix dead link

* fix dead link

* fix dead link

* ignore some link

* ignore some link

* ignore some link

* fix dead link

* fix dead link

* rename job name

* fix config error

* ignore daxue link

2 months agostage 2.2: (#3380)
StevenLuMT [Wed, 6 Jul 2022 06:30:38 +0000 (14:30 +0800)] 
stage 2.2: (#3380)

if old bookeeper node want to upgrade this cookie
add a funtion in cookie_generate for update indexDirs

Co-authored-by: lushiji <lushiji@didiglobal.com>
2 months agoFix: NPE in RackawareEnsemblePlacementPolicyImpl logged by AutoRecovery (#3350)
Andrey Yegorov [Wed, 6 Jul 2022 00:57:52 +0000 (17:57 -0700)] 
Fix: NPE in RackawareEnsemblePlacementPolicyImpl logged by AutoRecovery (#3350)

### Motivation

AR keeps on logging NPE during rereplication:

```
[ReplicationWorker] WARN  org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Received exception while trying to get network location of bookie: ...
java.lang.NullPointerException: null
```

The NPE seems to be easily avoidable, no need to throw exception and log it just to ignore.

### Changes

Added check for bookie being present in the knownBookies map before accessing it.

2 months agoBP-47 (task7): DbLedgerStorage add direct entry logger support (#3366)
Hang Chen [Mon, 4 Jul 2022 15:34:34 +0000 (23:34 +0800)] 
BP-47 (task7): DbLedgerStorage add direct entry logger support (#3366)

2 months agoFix the Intellij key nouns. (#3381)
liuzhuang2017 [Sat, 2 Jul 2022 06:02:07 +0000 (14:02 +0800)] 
Fix the Intellij key nouns. (#3381)