forked from apache/ignite
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IGNITE-8926 Fixed deadlock on metadata registration and concurrent CQ…
… modification - Fixes apache#4507.
- Loading branch information
1 parent
02a874e
commit 62a50ba
Showing
33 changed files
with
711 additions
and
98 deletions.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
modules/core/src/main/java/org/apache/ignite/internal/UnregisteredBinaryTypeException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.ignite.internal; | ||
|
||
import org.apache.ignite.IgniteException; | ||
import org.apache.ignite.internal.binary.BinaryMetadata; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
/** | ||
* Exception thrown during serialization if binary metadata isn't registered and it's registration isn't allowed. | ||
*/ | ||
public class UnregisteredBinaryTypeException extends IgniteException { | ||
/** */ | ||
private static final long serialVersionUID = 0L; | ||
|
||
/** */ | ||
private final int typeId; | ||
|
||
/** */ | ||
private final BinaryMetadata binaryMetadata; | ||
|
||
/** | ||
* @param typeId Type ID. | ||
* @param binaryMetadata Binary metadata. | ||
*/ | ||
public UnregisteredBinaryTypeException(int typeId, BinaryMetadata binaryMetadata) { | ||
this.typeId = typeId; | ||
this.binaryMetadata = binaryMetadata; | ||
} | ||
|
||
/** | ||
* @param msg Error message. | ||
* @param typeId Type ID. | ||
* @param binaryMetadata Binary metadata. | ||
*/ | ||
public UnregisteredBinaryTypeException(String msg, int typeId, | ||
BinaryMetadata binaryMetadata) { | ||
super(msg); | ||
this.typeId = typeId; | ||
this.binaryMetadata = binaryMetadata; | ||
} | ||
|
||
/** | ||
* @param cause Non-null throwable cause. | ||
* @param typeId Type ID. | ||
* @param binaryMetadata Binary metadata. | ||
*/ | ||
public UnregisteredBinaryTypeException(Throwable cause, int typeId, | ||
BinaryMetadata binaryMetadata) { | ||
super(cause); | ||
this.typeId = typeId; | ||
this.binaryMetadata = binaryMetadata; | ||
} | ||
|
||
/** | ||
* @param msg Error message. | ||
* @param cause Non-null throwable cause. | ||
* @param typeId Type ID. | ||
* @param binaryMetadata Binary metadata. | ||
*/ | ||
public UnregisteredBinaryTypeException(String msg, @Nullable Throwable cause, int typeId, | ||
BinaryMetadata binaryMetadata) { | ||
super(msg, cause); | ||
this.typeId = typeId; | ||
this.binaryMetadata = binaryMetadata; | ||
} | ||
|
||
/** | ||
* @return Type ID. | ||
*/ | ||
public int typeId() { | ||
return typeId; | ||
} | ||
|
||
/** | ||
* @return Binary metadata. | ||
*/ | ||
public BinaryMetadata binaryMetadata() { | ||
return binaryMetadata; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.