Skip to content

304589 delete data on replace - #320

Open
michailpanagiotou wants to merge 5 commits into
DevEnvfrom
304589-delete-data-on-replace
Open

304589 delete data on replace#320
michailpanagiotou wants to merge 5 commits into
DevEnvfrom
304589-delete-data-on-replace

Conversation

@michailpanagiotou

Copy link
Copy Markdown
Contributor

No description provided.

Dimitris1990 and others added 5 commits May 15, 2026 13:21

@apboutos-trasys apboutos-trasys left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few null cases to be handled at the beginnning. I can see no other problem in the review face. Needs to be tested.

for(int i=0; i < numberOfRetriesForJobPolling; i++) {
DremioJobStatusResponse response = this.pollForJobStatus(processId);
String jobState = response.getJobState().getValue();
if(jobState.equals(DremioJobStatusEnum.COMPLETED.getValue())) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jobState.equals(DremioJobStatusEnum.COMPLETED.getValue()) will throw NullPointerException if jobstate is

use equals on the static string value instead DremioJobStatusEnum.COMPLETED.getValue().equals(jobstate)

processIsFinished = true;
break;
}
else if(jobState.equals(DremioJobStatusEnum.CANCELED.getValue()) || jobState.equals(DremioJobStatusEnum.FAILED.getValue())){

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Boolean processIsFinished = false;
for(int i=0; i < numberOfRetriesForJobPolling; i++) {
DremioJobStatusResponse response = this.pollForJobStatus(processId);
String jobState = response.getJobState().getValue();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the response or the JobState is null this will produce a NullPointerException that will break your for loop. The retry mechanism is meaningless in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants