[infinispan-issues] [JBoss JIRA] (ISPN-4651) LevelDB crashes JVM when stop() is called concurrently with write()
Dan Berindei (JIRA)
issues at jboss.org
Fri Aug 22 10:32:00 EDT 2014
[ https://issues.jboss.org/browse/ISPN-4651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Berindei updated ISPN-4651:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 7.0.0.Beta2
Resolution: Done
> LevelDB crashes JVM when stop() is called concurrently with write()
> -------------------------------------------------------------------
>
> Key: ISPN-4651
> URL: https://issues.jboss.org/browse/ISPN-4651
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Loaders and Stores
> Affects Versions: 7.0.0.Beta1
> Reporter: Radim Vansa
> Assignee: Radim Vansa
> Fix For: 7.0.0.Beta2
>
>
> This test reproduces the issue:
> {code}
> public void testConcurrentWriteAndRestart() {
> final int THREADS = 4;
> final AtomicBoolean run = new AtomicBoolean(true);
> final CountDownLatch started = new CountDownLatch(THREADS);
> ExecutorService executor = Executors.newFixedThreadPool(THREADS);
> for (int i = 0; i < THREADS; ++i) {
> executor.execute(new Runnable() {
> @Override
> public void run() {
> started.countDown();
> int i = 0;
> while (run.get()) {
> InternalCacheEntry entry = TestInternalCacheEntryFactory.create("k" + i, "v" + i);
> MarshalledEntry me = TestingUtil.marshalledEntry(entry, getMarshaller());
> cl.write(me);
> ++i;
> }
> }
> });
> }
> try {
> started.await();
> Thread.sleep(1000);
> cl.stop();
> Thread.sleep(1000);
> cl.start();
> Thread.sleep(1000);
> } catch (InterruptedException e) {
> throw new IllegalStateException(e);
> } finally {
> run.set(false);
> executor.shutdown();
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the infinispan-issues
mailing list