Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1626: Add tests for LedgerUnderredplicationManager#markLedgerUnderreplicatedAsync #1629

Open
wants to merge 1,642 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
1642 commits
Select commit Hold shift + click to select a range
54ffc3c
Rackaware placement policy support local node awareness by hostname (…
hangc0276 Sep 20, 2023
4c5d965
Fix NoSuchElementException when rereplicate empty ledgers (#4039)
chenhongSZ Sep 20, 2023
d575ac8
BP-64: Improve the description of 47 commands for bin/bookkeeper (#4102)
StevenLuMT Oct 17, 2023
0ad959d
Ignore the empty `perRegionPlacement` when RegionAwareEnsemblePlaceme…
horizonzy Oct 18, 2023
66086db
Upgrade Zookeeper to 3.8.3 to address CVE-2023-44981 (#4112)
lhotari Oct 23, 2023
0d2dadf
Update the document of diskUsageWarnThreshold (#4072)
hangc0276 Oct 23, 2023
3768be0
New API for batched reads (#4051)
horizonzy Oct 23, 2023
51e6281
Update release note for 4.16.2 (#4082)
hangc0276 Oct 23, 2023
0063516
Generate 4.14.8 website documents (#4076)
hangc0276 Oct 26, 2023
fc96ab5
Fix bug of negative JournalQueueSize (#4077)
XLzed Oct 26, 2023
8b68c83
Upgrade bc-fips to 1.0.2.4 to fix CVE-2022-45146 (#3915)
hangc0276 Oct 26, 2023
416e8da
Remove the unused logs in the CleanupLedgerManager.recordPromise (#4121)
zymap Nov 1, 2023
e42d91c
[website]rest api documentation patch for GC and ReadonlyState (#3877)
zwOvO Nov 6, 2023
0582692
Make AutoRecovery enable stickyReadS as default. (#4125)
horizonzy Nov 9, 2023
9cfa787
Fix no known bookies after reset racks for all BKs (#4128)
poorbarcode Nov 20, 2023
6973534
Update Jetty dependency. (#4141)
Ghatage Dec 4, 2023
b0ba8c9
issue 4109: Fix Flaky-test: HandleFailuresTest.testHandleFailureBooki…
AnonHxy Dec 4, 2023
ffe8db3
make waitForNewAuditor stronger. (#4078)
horizonzy Dec 4, 2023
2df24d7
Tune the test case (#4093)
horizonzy Dec 4, 2023
08685cc
Fix a slow gc thread shutdown when compacting (#4127)
erobot Dec 4, 2023
5966248
Use Flaky flag to skip testBookieServerZKSessionExpireBehaviour test …
hangc0276 Dec 7, 2023
a72c53e
fix calculate checkSum when using Java9IntHash (#4140)
poorbarcode Dec 7, 2023
0d88710
Update StatsProvider URL (#4148)
zwOvO Dec 8, 2023
17b0f8e
when setExplicitLac is called the ledgersCount should increased (#4138)
liubingxing Dec 11, 2023
3a6e6de
FastTimer to return rates if queried at the same second as update (#4…
dlg99 Dec 13, 2023
9f6e2b8
Release note 4.15.5 (#4151)
zymap Dec 19, 2023
5419bea
Upgrade Netty to 4.1.104.Final and io_uring to 0.0.24.Final (#4157)
lhotari Dec 22, 2023
9dd159e
[fix][conf-stats] Fix default configuration 'statsProviderClass' (#4156)
zwOvO Dec 22, 2023
5af14e2
Fix auditor thread leak problem. (#4162)
horizonzy Dec 25, 2023
e3b58ea
Fix logging configurations are broken in docker image (#4137)
Shawyeok Dec 29, 2023
3237329
[doc] fix bookkeeper binary path (#4166)
zwOvO Jan 1, 2024
42b3b34
split performance in two parts and add sticky reads part. (#4131)
KannarFr Jan 2, 2024
938d0cf
Update copy right year from 2023 to 2024 (#4167)
shoothzj Jan 2, 2024
39ee7fd
Entry write support local node region aware placement policy (#4063)
hangc0276 Jan 5, 2024
5138d1b
Increase journal thread priority (#4120)
hangc0276 Jan 5, 2024
feae09e
Add OpenTelemetry stats provider and change Prometheus stats provider…
zwOvO Jan 8, 2024
5381e35
[doc] Fix stats providers in configuration (#4169)
zwOvO Jan 8, 2024
92f283f
Fix the autorecovery failed replicate by add entry fenced error (#4163)
zymap Jan 8, 2024
5dca8ab
Update Docker README.md (#4160)
crossoverJie Jan 8, 2024
b18fb0c
Skip sync the RocksDB when no changes (#3904)
hangc0276 Jan 8, 2024
f76fcef
Generate 4.15.5 website (#4158)
zymap Jan 8, 2024
d2492bd
Issue 4134: Fixing memory leak error when using DirectEntryLogger (#4…
graysonzeng Jan 8, 2024
22bacaa
Optimize shell log print (#4037)
AnonHxy Jan 8, 2024
5ba1f7d
fix a config error (#4098)
TakaHiR07 Jan 8, 2024
7187e8f
fix LedgerHandle `ensembleChangeCounter` not used. (#4103)
lifepuzzlefun Jan 8, 2024
6ba16f5
Try to use jdk api to create hardlink when rename file when compactio…
lifepuzzlefun Jan 8, 2024
4dd15cf
rebase (#4146)
AnonHxy Jan 9, 2024
23bfe50
Chagne the method getUnderreplicatedFragments to the package private …
zymap Jan 10, 2024
9a69810
Improve auto-recovery noise log when some bookie down. (#4118)
horizonzy Jan 10, 2024
3943c86
Change callbacks in CleanupLedgerManager as a Set (#4123)
AnonHxy Jan 11, 2024
4bc798b
Fix auditor elector executor block problem. (#4165)
horizonzy Jan 18, 2024
dce5f74
[BP-62] Batch read protocol change: Support encoding and decoding for…
horizonzy Jan 23, 2024
8b77121
[BP-62] Bookie server introduces the BatchedReadEntryProcessor to han…
horizonzy Jan 24, 2024
4473187
[BP-62] Bookkeeper client introduce batch read request api. (#4188)
horizonzy Jan 26, 2024
06146a7
Generate 4.16.4 website doc (#4191)
hangc0276 Jan 29, 2024
55673a4
Generate 4.16.4 release note (#4182)
hangc0276 Jan 29, 2024
4de5b95
[improve][docker] fix yaml and dockerfile (#4186)
zwOvO Jan 29, 2024
04c190c
Enable reorder read sequence for bk client by default (#4139)
hangc0276 Feb 1, 2024
070c3b6
[BP-62] Refactor read op, and introduce batchReadOp. (#4190)
horizonzy Feb 5, 2024
43ce06c
[BP-62] LedgerHandle introduces batch read API. (#4195)
horizonzy Feb 5, 2024
42b493a
Fix checksum calculation bug when the payload is a CompositeByteBuf w…
lhotari Feb 7, 2024
e1929ac
Bump jsoup from 1.14.3 to 1.15.3 (#3465)
dependabot[bot] Feb 7, 2024
e3599f3
Enable CodeQL static code scanner (#4203)
merlimat Feb 8, 2024
f7c0db1
Add support for Junit5 tests and fix CI that has been broken (#4197)
lhotari Feb 8, 2024
f259a1a
Use netty-bom for aligning netty library versions, add epoll for linu…
lhotari Feb 8, 2024
c1b5b35
Improve DefaultEntryLogger read performance. (#4038)
horizonzy Feb 12, 2024
b3b545a
Fix implicit cast from long to int (#4209)
hangc0276 Feb 19, 2024
1e5e8ad
AutoRecovery supports batch read (#4211)
hangc0276 Feb 20, 2024
156fcc0
Use mockito instead of powermock (#4212)
nodece Feb 20, 2024
ebfd0dc
Add `InetAddress.getLocalHost().getCanonicalHostName()` for MyRack. (…
horizonzy Feb 20, 2024
2ac7aa9
[BP-62] Add more test for Bookkeeper. (#4210)
horizonzy Feb 20, 2024
a811b2a
[improve] fix doc & fix listfilesondisc cmd description (#4184)
zwOvO Feb 21, 2024
8690f22
Remove duplicate setBatchReadEnabled (#4215)
nodece Feb 21, 2024
0dbad3b
Upgrade mockito from 3.12.4 to 4.11.0 (#4218)
nodece Feb 21, 2024
83052d8
BenchReadThroughputLatency support config the way of gen ledger path.…
horizonzy Mar 1, 2024
2e28b9b
Add filename check for unTar (#4222)
hangc0276 Mar 4, 2024
11ebb77
Fix uncontrolled data used in path expression (#4221)
hangc0276 Mar 4, 2024
a7519b5
Fix error stack track may expose to external user (#4223)
hangc0276 Mar 4, 2024
a78a946
Bump org.apache.commons:commons-compress from 1.21 to 1.26.0 (#4214)
dependabot[bot] Mar 5, 2024
6e2728c
Upgrade Netty to 4.1.107.Final and io_uring to 0.0.25.Final (#4224)
sullis Mar 14, 2024
d23ef50
Bump version to 4.18.0-SNAPSHOT (#4229)
eolivelli Mar 15, 2024
bb3fc35
[BP-62] Tune the BP-62 doc (#4227)
horizonzy Mar 18, 2024
7889438
Fix BenchReadThroughputLatency batch read can't stop problems. (#4220)
horizonzy Mar 18, 2024
a564dc4
Issue 2161: set metrics endpoint content-type (#4208)
Mar 18, 2024
d9ef7c5
Simplify getting project version in release script (#4235)
lhotari Mar 21, 2024
fc03d41
Fix duplicate artifacts issue with maven-source-plugin in release bui…
lhotari Mar 21, 2024
b3c7a15
Improve release script instructions (#4236)
lhotari Mar 21, 2024
ea904b3
Issue 4200: fix flaky test DeferredSyncTest.testForceWillAdvanceLacOn…
tmzk1005 Mar 21, 2024
9864b23
Bump org.apache.zookeeper:zookeeper from 3.8.3 to 3.8.4 (#4231)
dependabot[bot] Mar 22, 2024
0297acc
Bump follow-redirects from 1.14.9 to 1.15.6 in /site3/website (#4230)
dependabot[bot] Mar 22, 2024
b1fa1f0
docs: improve release notes generation (#4250)
nicoloboschi Mar 27, 2024
238f34f
Bump express from 4.18.2 to 4.19.2 in /site3/website (#4251)
dependabot[bot] Mar 29, 2024
93afa63
chore: remove stale powermock comment (#4252)
shoothzj Mar 29, 2024
0485115
fix description of BookKeeperAdmin#watchWritableBookiesChanged (#4254)
thetumbled Apr 1, 2024
07a01e0
Add Cookie to LocalBookie (#4052)
yaalsn Apr 1, 2024
7671823
Fixed creation of temporary dir in NativeUtils (#4262)
merlimat Apr 3, 2024
081cb07
Upgrade vertx-core to 4.5.7 to address CVE-2024-1300 (#4265)
lhotari Apr 4, 2024
18d9000
Upgrade Lombok to 1.18.32 for Java 22 support (#4267)
lhotari Apr 4, 2024
62f60a6
dependency: bump slf4j log4j2 version (#4248)
shoothzj Apr 6, 2024
0f0d730
Use vertx blockingHandlers that allow blocking without warnings (#4266)
lhotari Apr 8, 2024
0936939
Bump webpack-dev-middleware from 5.3.1 to 5.3.4 in /site3/website (#4…
dependabot[bot] Apr 9, 2024
dcb5785
Bump @babel/traverse from 7.17.3 to 7.24.1 in /site3/website (#4268)
dependabot[bot] Apr 9, 2024
3544a0e
Remove unused journaltime (#4006)
gaozhangmin Apr 9, 2024
89c8764
Bump postcss from 8.4.8 to 8.4.38 in /site3/website (#4271)
dependabot[bot] Apr 9, 2024
524d92d
Bump semver from 5.7.1 to 5.7.2 in /site3/website (#4027)
dependabot[bot] Apr 9, 2024
2559bbe
Bump loader-utils from 2.0.2 to 2.0.4 in /site3/website (#3942)
dependabot[bot] Apr 9, 2024
0e265c2
Bump ua-parser-js from 0.7.31 to 0.7.37 in /site3/website (#4272)
dependabot[bot] Apr 9, 2024
d3cea9f
Bump @sideway/formula from 3.0.0 to 3.0.1 in /site3/website (#3861)
dependabot[bot] Apr 9, 2024
3d4fbd7
Release notes for 4.16.5 (#4249)
nicoloboschi Apr 10, 2024
18ea24c
chore: remove deprecated class MathUtils (#4274)
shoothzj Apr 10, 2024
c9e249c
docs: remove -SNAPSHOT from 4.16.5 title (#4275)
nicoloboschi Apr 10, 2024
2290fca
feat: allow user config AsyncLogger in log4j2 (#4269)
shoothzj Apr 11, 2024
d9f1985
chore: update website url from http to https (#4281)
shoothzj Apr 11, 2024
bb6b05f
chore: clean up org.apache.bookkeeper.util package-info.java (#4277)
shoothzj Apr 11, 2024
5ce34f4
build: fix maven scm tag branch (#4280)
shoothzj Apr 11, 2024
3cf8942
fix: windows test failure in ConfigDefTest (#4273)
shoothzj Apr 12, 2024
87731a1
fix: miss test log in prometheus-metrics-provider module (#4279)
shoothzj Apr 12, 2024
0f297b3
Release notes and website for 4.17.0 (#4260)
eolivelli Apr 17, 2024
736eed6
[fix] Fix ByteBuf release/retain in PerChannelBookClient (#4289)
poorbarcode Apr 17, 2024
32fdbb9
Deprecate method `setAllocatorPoolingConcurrenncy` due to typos and a…
hudeqi Apr 18, 2024
28ebdd7
fix: correct the document related version (#4298)
shoothzj Apr 18, 2024
bbc37d0
fix tests running when skipTests provided (#4297)
shoothzj Apr 18, 2024
d5015fc
chore: add idea icon and vcs.xml (#4286)
shoothzj Apr 19, 2024
8492680
compatible fix wrong key for getHttpServerTrustStorePassword (#4301)
shoothzj Apr 19, 2024
548b821
improve: use SLASHSTAR_STYLE for licenses in Java files (#4299)
shoothzj Apr 20, 2024
3c1d8aa
Bump bouncycastl version from 1.75 to 1.78 (#4295)
shoothzj Apr 20, 2024
7f88df2
improve: change scheduleAtFixedRate to scheduleWithFixedDelay in Garb…
shoothzj Apr 20, 2024
ff117d0
chore: remove ostrich version, it's code has been removed after 4.10.…
shoothzj Apr 21, 2024
08148cf
test: fix testJvmDirectMemoryMetrics windows test failure (#4294)
shoothzj Apr 21, 2024
24834d9
build: add java21 and windows daily build (#4292)
shoothzj Apr 22, 2024
22b6a87
chore: reduce executable permissions on non-executable files (#4290)
shoothzj Apr 22, 2024
27d9b12
fix wrong implementation for `percentile` in bookkeeper-benchmark (#3…
trevor211 Apr 22, 2024
911d98b
Optimize bookie usage information while using command line option --h…
tmzk1005 Apr 22, 2024
f0e3e1e
chore: fix typos in interface ClientAuthProvider and BookieAuthProvid…
hanmz Apr 23, 2024
40ff981
chore: fix some typos in package org.apache.bookkeeper.bookie.storage…
hanmz Apr 24, 2024
bc7f317
chore: fix typos in class DataIntegrityCookieValidation (#4312)
hanmz Apr 24, 2024
b4eab2f
build: disable BookieZKExpireTest beyond jdk17 (#4309)
shoothzj Apr 28, 2024
5a191ad
test: use junit assert instead of java assert statement in test (#4310)
shoothzj Apr 28, 2024
c39dd1c
chore: remove unused jsoup version define (#4315)
shoothzj Apr 28, 2024
115f7c2
fix guava shade error in distributedlog (#4319)
shoothzj Apr 28, 2024
f10550c
[fix] Fix ArrayIndexOut0fBoundsException caused by optimistic lock (#…
thetumbled Apr 28, 2024
cc32363
build: disable DirectIO Tests in windows (#4320)
shoothzj Apr 28, 2024
3d1e888
Prevent bookie shutdown due to rest api when bookie prohibits readOnl…
wenbingshen Apr 29, 2024
0212417
improve: remove duplicate forceGarbageCollection setValue in run meth…
shoothzj Apr 29, 2024
5dc1ff7
Fix the pid occupied check when use bookkeeper-daemon.sh start or sto…
Nicklee007 Apr 29, 2024
9c8e67e
fix: bookie http endpoint info always return 0.0.0.0 (#4325)
nicoloboschi Apr 30, 2024
f327200
chore: remove unused slf4j simpleLogger property (#4321)
shoothzj Apr 30, 2024
96fc7ff
BP-66: support throttling for zookeeper read during rereplication (#4…
thetumbled Apr 30, 2024
c53c81a
Adjust Log Level for LedgerFencedException in WriteEntryProcessor (#4…
shoothzj May 3, 2024
c31e8f0
Apply WRITE_BUFFER_WATER_MARK setting to child channels in BookieNett…
shoothzj May 4, 2024
b78da6f
Add BK 4.17.0 to the releases in the website (#4339)
eolivelli May 5, 2024
b37b8a6
Fix test TestTLS for Windows compatibility in BookKeeper (#4329)
shoothzj May 5, 2024
355d046
build: disable testNewEnsembleBookieWithOneEmptyRegion method in Test…
shoothzj May 5, 2024
fcfdeac
doc: update PR template to better link to issue (#4335)
shoothzj May 6, 2024
6f9b05b
build: remove unused cpp library rt (#4338)
shoothzj May 6, 2024
3751934
build: fix JAVA_HOME not properly set in docker image (#4333)
shoothzj May 6, 2024
78b6957
Use slf4j-bom and log4j-bom in dependencyManagement (#4346)
lhotari May 6, 2024
e8f8a84
Fix improper negative key generation and update assertions in tests (…
shoothzj May 7, 2024
024ad62
ci: add java21 Compatibility Check (#4350)
shoothzj May 8, 2024
cde3c19
Disable two tests in BookKeeperTest on JDK 17+ due to UnsupportedOper…
shoothzj May 8, 2024
8a689f3
doc: add the missing release news (#4341)
shoothzj May 9, 2024
c6f77a9
BP-66: support throttling for zookeeper read during rereplication (#4…
thetumbled May 9, 2024
8236257
Bump jackson from 2.13.4.20221013 to 2.17.1 to address CVE list (#4345)
shoothzj May 9, 2024
b8eb4a7
build: add owasp daily build (#4330)
shoothzj May 9, 2024
f20c440
fix: resource leak when JournalChannel is not fully initialized (#4340)
shoothzj May 9, 2024
95aa7e4
improve: replace deprecated method usage in vertx (#4343)
shoothzj May 9, 2024
50f9963
test: fix bkHttpServiceProvider not closed in TestHttpService (#4349)
shoothzj May 9, 2024
0b79936
doc: add the missing upgrade docs (#4348)
shoothzj May 10, 2024
c504732
build: remove empty module backward-compat yahoo-custom-version (#4331)
shoothzj May 10, 2024
c83dd12
chore: remove assert statement in LedgerDescriptor (#4334)
shoothzj May 10, 2024
b5bdcf4
doc: add missing parameters and reorganize existing parameters in com…
thetumbled May 10, 2024
b189b26
Added more relevant labels to .asf.yaml (#4351)
shoothzj May 11, 2024
063833d
build: fix OWASP GitHub daily workflow (#4357)
shoothzj May 11, 2024
95e5b24
Skip mount command error (#4360)
yaalsn May 11, 2024
ae5a0fd
Fix disk weight ensemble infinite loop bug (#4324)
hangc0276 May 11, 2024
affbee7
Add Compaction Duration Settings to 4.14.0 Upgrade Docs (#4358)
thetumbled May 11, 2024
729a984
[site][bugfix] BK website version 4.17.0, missing sidebar (#4363)
zwOvO May 12, 2024
514d026
build(deps): bump org.bouncycastle:bc-fips from 1.0.2.4 to 1.0.2.5 (#…
dependabot[bot] May 15, 2024
8d4a9fb
build: update latest docker image from 4.15.1 to 4.17.0 (#4364)
shoothzj May 15, 2024
a24259b
Bump jetcd from 0.5.0 to 0.7.7 (#3849)
shoothzj May 16, 2024
83d57ab
doc: update release guide to update the latest image (#4367)
shoothzj May 16, 2024
5084b69
doc: update documentation for releases and APIs to reflect correct ve…
shoothzj May 16, 2024
34344e7
test: migrate client module bookie tests to junit 5 (#4359)
sherlock-lin May 16, 2024
807d94d
Bump grpc from 1.56.0 to 1.64.0 to address CVE list (#4344)
shoothzj May 16, 2024
46233fa
Fix script to resolve target/cached_classpath.txt not found error (#4…
yaalsn May 16, 2024
6012972
build: remove stale owasp suppressions (#4369)
shoothzj May 17, 2024
d115386
build: fix owasp check is broken (#4371)
shoothzj May 20, 2024
92dfb95
chore: fix typo in docs (#4378)
shoothzj May 22, 2024
c5359b5
fix typos in sh and py files (#4379)
shoothzj May 22, 2024
2b3247d
Fix ThreadRegistry#register behavior to ensure correct Prom metrics …
michaeljmarshall May 22, 2024
3229970
fix typos in test java files (#4380)
shoothzj May 23, 2024
a28837b
fix: reference counting (retain/release) in PerChannelBookieClient (#…
lhotari May 24, 2024
a9524d1
Remove unused code from ByteBufVisitor (#4383)
lhotari May 24, 2024
022527c
Enhance the SimpleTestCommand test, make it cover more case. (#4387)
horizonzy May 25, 2024
fda3862
fix OrderedExecutor lost some metric (#4374)
TakaHiR07 May 25, 2024
949acce
remove stale sleep code in BookieServer (#4336)
shoothzj May 25, 2024
eff109a
ci: add typo ci check and fix typos (#4375)
shoothzj May 26, 2024
9a00eae
build: remove tests module from owasp check (#4391)
shoothzj May 27, 2024
d7254ab
Adapt Checkstyle in microbenchmarks module (#4397)
shoothzj May 29, 2024
307ff7d
ci: fix docs changes expected status hang forever (#4395)
shoothzj May 29, 2024
e9000b2
Fix TLS stability issues with V2 protocol that caused data corruption…
lhotari May 29, 2024
6f928d4
Correct Configuration Error in OWASP Dependency Check Plugin Setup (#…
shoothzj May 30, 2024
5f09dd6
Override OkHttp Version in Otel to Fix CVE-2023-3635 (#4400)
shoothzj May 30, 2024
1c7caff
Remove @FlakyTest annotation from testDecommissionBookie method (#4408)
shoothzj May 30, 2024
dd55179
Replace assert statements with explicit checks (#4390)
shoothzj May 30, 2024
1c534b0
Fix duplicated call zkGetLogSegmentNames (#4050)
AnonHxy May 30, 2024
d1a7acb
Disable annoying logs when segments is empty (#4048)
mattisonchao May 30, 2024
10dfe37
Close the RegistrationManager in the finally block in AuditorPlacemen…
horizonzy May 30, 2024
77e73a2
Fix the bookkeeper-server-shaded version in ledger-api doc (#4108)
yangl May 31, 2024
1523146
Prevent double flush due to race in SingleDirectoryDbLedgerStorage (#…
michaeljmarshall May 31, 2024
bd9ea1a
SingleDirectoryDbLedgerStorage skip optimistic cache put sometimes (#…
michaeljmarshall May 31, 2024
582f271
Fix RocksDB configuration path handling on Windows (#4407)
shoothzj May 31, 2024
52320ac
tests: close bookkeeper client in testSequenceReadLocalEnsemble (#4416)
shoothzj Jun 3, 2024
346042c
Upgrade RocksDB to version 7.10.2 (#4413)
dlg99 Jun 3, 2024
77cf3f9
docs: fix Google Kubernetes Engine link (#4418)
shoothzj Jun 4, 2024
4bb9acb
chore: remove dead config ensemblePlacementPolicyOrderSlowBookies (#4…
shoothzj Jun 5, 2024
03a9f20
[fix] fix Auditor ignoring bookies shut down before Auditor start (#4…
dlg99 Jun 5, 2024
8214b2d
[improve][tests] Backwards compat tests: added new versions, pulsar u…
dlg99 Jun 5, 2024
a1926ca
[ci] Fix apache/pulsar-test-infra/paths-filter action permission in C…
yaalsn Jun 9, 2024
ca99d73
Fix TimedRunnable log NPE (#4425)
AnonHxy Jun 10, 2024
a680f85
test: update etcd build image version (#4429)
shoothzj Jun 12, 2024
593105e
Standardize Quotation Marks in Release Guide Documentation (#4427)
shoothzj Jun 12, 2024
64bea62
fix: release build image error when user's home dir is under /home (#…
zhiheng123 Jun 12, 2024
d01a817
Optimize Release Script for Docker Builds in BookKeeper (#4428)
shoothzj Jun 12, 2024
2fa75d8
Fix typo-check in CI, run only for pull requests because of security …
lhotari Jun 12, 2024
b6c7949
build(deps): bump braces from 3.0.2 to 3.0.3 in /site3/website (#4434)
dependabot[bot] Jun 12, 2024
7a8297b
build: upgrade python client version to prepare next release (#4435)
shoothzj Jun 13, 2024
67c870f
Upgrade to Netty 4.1.111.Final and switch to use grpc-netty-shaded (#…
lhotari Jun 13, 2024
b45522c
Remove deprecated method setAllocatorPoolingConcurrenncy (#4431)
hudeqi Jun 13, 2024
f91ab8d
Replace deprecated getNextTarEntry with getNextEntry in DockerUtils (…
shoothzj Jun 14, 2024
d7b795c
Remove unnecessary deprecation suppression in TestCompatRecoveryNoPas…
shoothzj Jun 14, 2024
7aa87b0
Upgrade/Downgrade test (#4438)
dlg99 Jun 18, 2024
603b8b4
build(deps): bump ws from 7.5.7 to 7.5.10 in /site3/website (#4440)
dependabot[bot] Jun 18, 2024
74500db
fix: correct the description of LedgerDirManager's methods (#4442)
ethqunzhong Jun 18, 2024
3bc94ed
Fix incorrect metadata state in MockLedgerHandle close method (#4443)
shoothzj Jun 19, 2024
ff1c230
docs: fix dead link of build.gradle description (#4441)
shoothzj Jun 19, 2024
e25e3f3
Release notes for 4.16.6 (#4388)
shoothzj Jun 24, 2024
4421a8e
Release notes for 4.17.1 (#4389)
shoothzj Jun 24, 2024
264025a
[Improvement] fix string comparison in ZkClusterInitializer (#4451)
dk2k Jun 26, 2024
f12b0be
build: update 4.17.1 and 4.16.6 to latest_release and stable_release …
shoothzj Jun 26, 2024
11fcaea
Update latest docker image version to 4.17.1 (#4452)
shoothzj Jun 26, 2024
544b34c
docs: add news about 4.16.6 and 4.17.1 release (#4455)
shoothzj Jun 26, 2024
d9f8119
[fix] fix string format for exception in RocksdbKVStore (#4448)
dk2k Jun 28, 2024
b70bb27
Update Release Script Instructions and Python Publishing Scripts (#4458)
shoothzj Jul 1, 2024
d04531c
improve: use jlink to reduce jdk size in the image (#4456)
nodece Jul 3, 2024
9fc262d
fix: fix resource leaks in 3 classes (#4449)
dk2k Jul 6, 2024
6af21b1
Correct RackawareEnsemblePlacementPolicyImpl defaultRack when the boo…
horizonzy Jul 8, 2024
4e1a30c
Fix the completionObjects leak problem. (#4285)
horizonzy Jul 9, 2024
c30ab3c
Enable ZooKeeper client to establish connection in read-only mode (#4…
massakam Jul 10, 2024
ad48ed4
Make changes to rebase to current master.
Ghatage Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ public static String getUrLedgerLockZnode(String base, long ledgerId) {
return String.format("%s/urL%010d", base, ledgerId);
}

private String getUrLedgerZnode(long ledgerId) {
@VisibleForTesting
String getUrLedgerZnode(long ledgerId) {
return getUrLedgerZnode(urLedgerPath, ledgerId);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.bookkeeper.meta;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import org.apache.bookkeeper.common.concurrent.FutureUtils;
import org.apache.bookkeeper.conf.ServerConfiguration;
import org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat;
import org.apache.bookkeeper.replication.ReplicationException;
import org.apache.bookkeeper.suites.BookKeeperClusterTestSuite;
import org.apache.bookkeeper.util.ZkUtils;
import org.apache.bookkeeper.zookeeper.BoundExponentialBackoffRetryPolicy;
import org.apache.bookkeeper.zookeeper.ZooKeeperClient;
import org.apache.commons.lang3.StringUtils;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.KeeperException.NoNodeException;
import org.apache.zookeeper.ZooKeeper;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
* Unit test {@link ZkLedgerUnderreplicationManager}.
*/
public class ZkLedgerUnderreplicationManagerTest extends BookKeeperClusterTestSuite {

@BeforeClass
public static void setUpCluster() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see that BookKeeperClusterTestSuite has static method with same signature/annotation. In java there is nothing like static method overriding, but this is junit quirk - "in JUnit BeforeClass methods should be named differently, otherwise will result in only the subclass method being run because the parent will be shadowed."

For a regular user it is little confusing to see method with same name and @BeforeClass annotation, probably we should remove @BeforeClass annotation for setUpCluster method in BookKeeperClusterTestSuite or may be pass numBookies as argument to the constructor just like in BookKeeperClusterTestCase.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also in the new testsuite, if the user named the BeforeClass method little differently (knowingly and unknowingly) then both the BeforeClass methods would be executed with the risk of setting up 2 clusters.

BookKeeperClusterTestSuite.setUpCluster(0);
}

@AfterClass
public static void tearDownCluster() throws Exception {
BookKeeperClusterTestSuite.tearDownCluster();
}

private static String getZooKeeperConnectString() throws Exception {
String[] serviceHosts = metadataStore.getServiceUri().getServiceHosts();
return StringUtils.join(serviceHosts, ',');
}

private static ZooKeeper createZooKeeper() throws Exception {
return ZooKeeperClient.newBuilder()
.connectString(getZooKeeperConnectString())
.connectRetryPolicy(
new BoundExponentialBackoffRetryPolicy(1, 10, 100))
.operationRetryPolicy(
new BoundExponentialBackoffRetryPolicy(1, 10, 100))
.sessionTimeoutMs(60000)
.build();
}

private ZooKeeper zk;
private ZkLedgerUnderreplicationManager urMgr;

@Before
public void setUp() throws Exception {
this.zk = createZooKeeper();
ServerConfiguration conf = new ServerConfiguration(baseServerConf);
conf.setStoreSystemTimeAsLedgerUnderreplicatedMarkTime(true);
this.urMgr = new ZkLedgerUnderreplicationManager(conf, zk);
}

@After
public void tearDown() throws Exception {
if (null != urMgr) {
this.urMgr.close();
}
if (null != zk) {
this.zk.close();
}
}

/**
* Test basic operation on {@link ZkLedgerUnderreplicationManager#markLedgerUnderreplicatedAsync(long, Collection)}.
*/
@Test
public void testMarkLedgerUnderreplicatedBasic() throws Exception {
long ledgerId = 0xabcdef;
Collection<String> missingBookies = Lists.newArrayList("bookie-1");

long prevCtime = -1L;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here probably you can assign current system time to prevCtime, instead of -1


// mark when it hasn't been marked before
FutureUtils.result(urMgr.markLedgerUnderreplicatedAsync(ledgerId, missingBookies));
UnderreplicatedLedgerFormat urLedgerFormat = urMgr.getLedgerUnreplicationInfo(ledgerId);
assertEquals(missingBookies, urLedgerFormat.getReplicaList());
assertTrue(urLedgerFormat.getCtime() > prevCtime);
prevCtime = urLedgerFormat.getCtime();

// mark when it has been marked. but the missing bookies already duplicated there
FutureUtils.result(urMgr.markLedgerUnderreplicatedAsync(ledgerId, missingBookies));
urLedgerFormat = urMgr.getLedgerUnreplicationInfo(ledgerId);
assertEquals(missingBookies, urLedgerFormat.getReplicaList());
assertTrue(urLedgerFormat.getCtime() >= prevCtime);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you checking ">=", it should be '==', ctime of marked underreplicated ledger should not change by adding/removing replicaslist to urledger. This would be nice test case to validate that statement.

prevCtime = urLedgerFormat.getCtime();

// mark with new bookies when it has been marked
Collection<String> newMissingBookies = Lists.newArrayList("bookie-2", "bookie-3");
FutureUtils.result(urMgr.markLedgerUnderreplicatedAsync(ledgerId, newMissingBookies));
urLedgerFormat = urMgr.getLedgerUnreplicationInfo(ledgerId);
assertEquals(
Lists.newArrayList("bookie-1", "bookie-2", "bookie-3"),
urLedgerFormat.getReplicaList()
);
assertTrue(urLedgerFormat.getCtime() >= prevCtime);
}

/**
* Test {@link ZkLedgerUnderreplicationManager#markLedgerUnderreplicatedAsync(long, Collection)} handles corrupted
* data.
*/
@Test
public void testMarkLedgerWithCorruptedDataExists() throws Exception {
long ledgerId = 0xabcdee;
String ledgerPath = urMgr.getUrLedgerZnode(ledgerId);
ZkUtils.createFullPathOptimistic(
zk, ledgerPath, "junk data".getBytes(UTF_8), ZkUtils.getACLs(baseServerConf), CreateMode.PERSISTENT);
Collection<String> missingBookies = Lists.newArrayList("bookie-1");
try {
FutureUtils.result(urMgr.markLedgerUnderreplicatedAsync(ledgerId, missingBookies));
fail("Should fail to mark ledger underreplicated if there is already corrupted data on zookeeper");
} catch (ReplicationException re) {
assertTrue(re.getMessage().contains("Invalid underreplicated ledger data for ledger " + ledgerPath));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm not sure how valid it is to rely on exception message. Probably getting ReplicationException should be enoungh

}
byte[] data = zk.getData(ledgerPath, null, null);
assertEquals("junk data", new String(data, UTF_8));
}

@Test
public void testMarkLedgerUnderreplicatedConcurrently() throws Exception {
final int numLedgers = 20;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: incorrect variable name. supposed to be numofbookies or something

List<CompletableFuture<Void>> futures = Lists.newArrayListWithExpectedSize(numLedgers);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new ArrayList<>(numLedgers() ?

long ledgerId = 0xabcc00;
Set<String> expectedBookies = Sets.newHashSet();
for (int i = 0; i < numLedgers; i++) {
futures.add(
urMgr.markLedgerUnderreplicatedAsync(
ledgerId, Lists.newArrayList("bookie-" + i)));
expectedBookies.add("bookie-" + i);
}
FutureUtils.result(FutureUtils.collect(futures));

UnderreplicatedLedgerFormat urLedgerFormat = urMgr.getLedgerUnreplicationInfo(ledgerId);
Set<String> actualBookies = Sets.newHashSet();
actualBookies.addAll(urLedgerFormat.getReplicaList());

assertEquals(expectedBookies, actualBookies);
}

@Test
public void testMarkLedgerUnderreplicatedConcurrentlyWithDifferentClients() throws Exception {
final int numLedgers = 20;
List<ZooKeeper> zks = new ArrayList<>(numLedgers);
List<ZkLedgerUnderreplicationManager> urMgrs = new ArrayList<>(numLedgers);

for (int i = 0; i < numLedgers; i++) {
zks.add(createZooKeeper());
urMgrs.add(new ZkLedgerUnderreplicationManager(baseServerConf, zks.get(i)));
}

List<CompletableFuture<Void>> futures = Lists.newArrayListWithExpectedSize(numLedgers);
long ledgerId = 0xabcd00;
Set<String> expectedBookies = Sets.newHashSet();
for (int i = 0; i < numLedgers; i++) {
futures.add(
urMgrs.get(i).markLedgerUnderreplicatedAsync(
ledgerId, Lists.newArrayList("bookie-" + i)));
expectedBookies.add("bookie-" + i);
}

FutureUtils.result(FutureUtils.collect(futures));

UnderreplicatedLedgerFormat urLedgerFormat = urMgr.getLedgerUnreplicationInfo(ledgerId);
Set<String> actualBookies = Sets.newHashSet();
actualBookies.addAll(urLedgerFormat.getReplicaList());

assertEquals(expectedBookies, actualBookies);

for (LedgerUnderreplicationManager urMgr : urMgrs) {
urMgr.close();
}
for (ZooKeeper zk : zks) {
zk.close();
}
}


@Test
public void testMarkLedgerUnderreplicatedWhenSessionExpired() throws Exception {
final long ledgerId = 0xabbd00;
try (ZooKeeper zk = new ZooKeeper(getZooKeeperConnectString(), 60000, null)) {
try (LedgerUnderreplicationManager urMgr = new ZkLedgerUnderreplicationManager(baseServerConf, zk)) {
// open another zookeeper client to expire current session
try (ZooKeeper newZk = new ZooKeeper(
getZooKeeperConnectString(), 60000, null, zk.getSessionId(), zk.getSessionPasswd()
)) {
try {
FutureUtils.result(urMgr.markLedgerUnderreplicatedAsync(
ledgerId, Lists.newArrayList("bookie-1")));
fail("Should fail if encountered zookeeper exceptions");
} catch (KeeperException ke) {
// expected
}
try {
UnderreplicatedLedgerFormat urLedgerFormat =
ZkLedgerUnderreplicationManagerTest.this.urMgr.getLedgerUnreplicationInfo(ledgerId);
fail("The ledger shouldn't been marked as underreplicated");
} catch (NoNodeException nee) {
// expected
}
}
}
}
}


}
Loading