Nordstrom / xrpc

Simple, production ready Java API server built on top of functional composition.
Apache License 2.0
17 stars 17 forks source link

RendezvousHash Concurrent NPE #203

Closed manimaul closed 5 years ago

manimaul commented 6 years ago

Summary

NPE: RendezvousHash uses a ConcurrentSkipLastMap which is concurrently cleared leading to a NPE when one thread is using the map while another clears it.

See fix in xio

Rather than synchronizing - we created a new TreeMap ... for each caller https://github.com/xjdr/xio/commit/3a826b975134913309bfb6f0f605099d1ced694a https://github.com/xjdr/xio/pull/273

Steps to reproduce

Run XRPC under load. (1000s of requests)

Expected behavior

NPE should not occur :).

Actual behavior

NPE

xrpc version

0.5.1