• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / bookkeeper / 450
72%

Build:
DEFAULT BRANCH: master
Ran 15 May 2019 02:39PM UTC
Jobs 1
Files 535
Run time 33s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
450

push

jenkins

Enrico Olivelli
[BK-GC] avoid blocking call in gc-thread

### Motivation

Right now, we have below 3 issues because of which gc thread gets blocked forever and it can't perform gc-task further. Below issues are mainly related to blocking call while doing zk-operation without timeout. 

bug-fixes:
1. right now, [GC - ScanAndCompareGarbageCollector](https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ScanAndCompareGarbageCollector.java#L142) passes timeout in millisecond to [LedgerManager](https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/LongHierarchicalLedgerManager.java#L166) but it 
takes it as second and again try to convert it in millis so, 30Kms timeout becomes [30M ms timeout](https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/ZkUtils.java#L245). Sp, fix timeout unit during gc.

2. Right now, GC makes blocking call to get list of children on ledger znode and sometime zk-call back doesn't comeback which blocks the gc-thread forever. However, recently we added the timeout on the [object-waiting-lock](https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/ZkUtils.java#L243-L248) which doesn't work because it's in while loop and `object.wait(timeout)` completes without any exception and GC threads keep running in while loop.

3. add zk-timeout during delete ledgers in bookie else it can also block the GC thread.





### Changes

add timeout while bk-gc makes zk-call to verify deleted ledgers.

Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org>, Rajan Dhabalia <rdhabalia@apache.org>

This closes #1940 from rdhabalia/verify_gc

27188 of 38048 relevant lines covered (71.46%)

0.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 450.1 15 May 2019 02:39PM UTC 0
71.46
Source Files on build 450
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #450
  • f5ddc36c on github
  • Prev Build on master (#449)
  • Next Build on master (#451)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc