Bug #3373
closed
java: after shutdown() access ceph_* in JNI is not prevented
Added by Noah Watkins over 11 years ago.
Updated about 5 years ago.
Component(FS):
Hadoop/Java
Description
When CephMount is created, a mount context is created to back it. Checks in libcephfs return errors for calls when used in an unmounted state. However, shutdown() cleans up everything, not just unmounting. Thus, following shutdown(), users should receive IllegalStateException if they try to access the Ceph client.
An alternative semantics which is more natural is to return CephMount to its initial state by performing a shutdown on the current context, and creating a new unmounted context. While more natural, we'd need a rw-lock to protect our native JNI pointer stored in the CephMount object. Is the added overhead of synchronization worth more than the more alternative semantics? Most users shouldn't be re-using their object after shutdown(), anyway!
- Status changed from New to 7
- Status changed from 7 to Won't Fix
Irrelevant after deprecating shutdown(). Users of CephMount can now remount after an unmount, and the backing context is only released during finalize(), so there are no user-facing special cases.
- Component(FS) Hadoop/Java added
- Category deleted (
48)
- Labels (FS) Java/Hadoop added
Also available in: Atom
PDF