Comments (6)
I added an integration test to reproduce this problem. Note that shutdown()
always calls flush()
, and your workaround just happens to work by chance.
The real issue is that flush()
kicks off flushBufferedIncrements()
but doesn't tie it to the Deferred it returns. So when you (edit: this is false, see 3 comments below). This is non-trivial to fix due to how the increments get flushed, I'm looking for a solution right now โ the good thing is that there is now a test for this case..join()
on either shutdown()
or flush()
, the call may return before all the increments are actually flushed to HBase
from asynchbase.
For reference the test case I added is at tsuna/asynchbase@addcea8 โ it wasn't originally supposed to test this bug, but it turns out that it does.
from asynchbase.
๐ Good stuff tsuna. Glad to see the tests coming through.
from asynchbase.
OK, so I understand where the problem is. flush()
correctly triggers a flush of buffered counter increments, but they aren't tied to the Deferred it returns.
What I said earlier was incorrect: "when you .join()
on either shutdown()
or flush()
, the call may return before all the increments are actually flushed to HBase" โ this is false. shutdown()
properly enforces that all in-flight RPCs complete before shutting down.
Really the only issue here is that the way we flush buffered counter increments makes it hard to tie them to a Deferred
.
from asynchbase.
I see how to fix this: we either make flush()
wait on all outstanding RPCs, or we add a new public API sync()
that does that (that would be analogous to Linux's sync()
system call).
I started a discussion on the mailing list asking for input.
Ideally flush()
would be able to gain access to the Deferreds of the buffered atomic increments, however due to the way increment coalescing is implemented with a Guava cache, this is rather tricky to implement and I don't see a more elegant solution than the one proposed above.
from asynchbase.
Have a proposed fix in tsuna/asynchbase@00598d0
from asynchbase.
Related Issues (20)
- Asynchbase MultiAction deserializes response from batch putRequest incorrectly HOT 1
- PR build failed with Java environment error HOT 1
- AssertionError: "Must not be used." HOT 1
- IN version2.3.0 HOT 1
- An exception was thrown by TimerTask. java.lang.OutOfMemoryError: Java heap space HOT 1
- Should buffering gets be possible? HOT 1
- When a scanner lease expires, it will retry request same regionserver endless. RS too busy! HOT 16
- can't set async wal?
- Mutation Attributes support
- Appends with no returns and few errors can break deserialization
- Can't re-write data correctly HOT 1
- Can you open chat room
- Why ConnectionResetException happen๏ผ HOT 1
- SparkStreaming with mapPartitions use client find error โToo many open filesโ HOT 1
- Comparison method violates its general contract
- org.hbase.async.NonRecoverableException: Too many attempts: OpenScannerRequest HOT 1
- How do i use the PageFilter
- Broken pipe error with "hbase.rpc.protection: privacy" HOT 1
- Can this support the kerberos authentication of hbase 2.2 HOT 1
- Not able to create jar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asynchbase.