Skip to content

Commit

Permalink
IGNITE-8926 : Added topology lock check for all groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilantukh authored and mcherkasov committed Aug 9, 2018
1 parent f2fe3e2 commit b3b2294
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.ignite.configuration.BinaryConfiguration;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.events.Event;
import org.apache.ignite.internal.GridComponent;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteNodeAttributes;
import org.apache.ignite.internal.UnregisteredBinaryTypeException;
Expand All @@ -59,6 +60,7 @@
import org.apache.ignite.internal.binary.streams.BinaryInputStream;
import org.apache.ignite.internal.binary.streams.BinaryOffheapInputStream;
import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
import org.apache.ignite.internal.processors.cache.CacheGroupContext;
import org.apache.ignite.internal.processors.cache.CacheObject;
import org.apache.ignite.internal.processors.cache.CacheObjectContext;
import org.apache.ignite.internal.processors.cache.CacheObjectValueContext;
Expand Down Expand Up @@ -458,7 +460,17 @@ public GridBinaryMarshaller marshaller() {
if (mergedMeta == oldMeta)
return;

if (failIfUnregistered)
boolean topLocked = false;

for (CacheGroupContext grp : ctx.cache().cacheGroups()) {
if (grp.isTopologyLocked()) {
topLocked = true;

break;
}
}

if (failIfUnregistered || topLocked)
throw new UnregisteredBinaryTypeException(typeId, mergedMeta);

MetadataUpdateResult res = transport.requestMetadataUpdate(mergedMeta).get();
Expand Down

0 comments on commit b3b2294

Please sign in to comment.