iamLalit
iamLalit

Reputation: 458

Cannot start/stop cache within lock or transaction

I have create a IgniteCache namely MYIGNITECACHE1 with as in Single Thread and locked one row Entry in it. And in same Locking period and Similar Thread I am creating another IgniteCache namely MYIGNITECACHE2 with as .

But while creating second Cache with as , I am getting IgniteException as Cannot start/stop cache within lock or transaction.

I am creating Cache as,

Ignite.getOrCreateCache("MYIGNITECACHE2");

Upvotes: 2

Views: 891

Answers (1)

Valentin Kulichenko
Valentin Kulichenko

Reputation: 8390

This is correct behavior. To avoid this you can either create a separate thread and create the cache there, or created all required caches before acquiring the lock.

Upvotes: 3

Related Questions