Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improve][Zeta] Remove assert key words #5947

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions release-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
- [Zeta] Improve Zeta operation max count and ignore NPE (#4787)
- [Zeta] Remove serialize(deserialize) cost when use shuffle action (#4722)
- [zeta] Checkpoint exception status messages exclude state data (#5547)
- [Zeta] Remove assert key words (#5947)

## Feature

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.debezium.annotation.Immutable;
import io.debezium.relational.Selectors.TableIdToStringMapper;
import io.debezium.schema.DataCollectionId;
import lombok.NonNull;

import java.io.Serializable;

Expand Down Expand Up @@ -97,12 +98,11 @@ protected static TableId parse(String[] parts, int numParts, boolean useCatalogB
public TableId(
String catalogName,
String schemaName,
String tableName,
@NonNull String tableName,
TableIdToStringMapper tableIdMapper) {
this.catalogName = catalogName;
this.schemaName = schemaName;
this.tableName = tableName;
assert this.tableName != null;
this.id =
tableIdMapper == null
? tableId(this.catalogName, this.schemaName, this.tableName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,13 @@ CompletableFuture<PendingCheckpoint> triggerPendingCheckpoint(
long triggerTimestamp,
CompletableFuture<Long> idFuture,
CheckpointType checkpointType) {
assert Thread.holdsLock(lock);
if (!Thread.holdsLock(lock)) {
throw new RuntimeException(
String.format(
"Unsafe invoke, the current thread[%s] has not acquired the lock[%s].",
Thread.currentThread().getName(), this.lock.toString()));
}

latestTriggerTimestamp.set(triggerTimestamp);
return idFuture.thenApplyAsync(
checkpointId ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ private void getSystemMonitoringInformation(HttpGetCommand command) {
} catch (InterruptedException | ExecutionException e) {
logger.severe("get system monitoring information fail", e);
}
assert input != null;
String[] parts = input.split(", ");
JsonObject jobInfo = new JsonObject();
Arrays.stream(parts)
Expand Down