Author: mduerig
Date: Fri Jul 17 14:32:44 2015
New Revision: 1691573
URL: http://svn.apache.org/r1691573
Log:
OAK-2609: Thread.interrupt seems to stop repository
Added a section about Thread.interrupt
Modified:
jackrabbit/oak/trunk/oak-doc/src/site/markdown/dos_and_donts.md
Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/dos_and_donts.md
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/dos_and_donts.md?rev=1691573&r1=1691572&r2=1691573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/dos_and_donts.md (original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/dos_and_donts.md Fri Jul 17
14:32:44 2015
@@ -78,3 +78,9 @@ might hit some limit causing the commit
8k for any inlined binary value. Further this would also lead to repository
growth as
by default when binaries are stored in BlobStore then they are deduplicated.
+### Don't use Thread.interrupt()
+
+`Thread.interrupt()` can severely impact or even stop the repository. The
reason for
+this is that Oak internally uses various classes from the `nio` package that
implement
+`InterruptibleChannel`, which are [asynchronously
closed](http://docs.oracle.com/javase/7/docs/api/java/nio/channels/InterruptibleChannel.html)
+when receiving an `InterruptedException` while blocked on IO. See
[OAK-2609](https://issues.apache.org/jira/browse/OAK-2609).