Skip to content

Conversation

@ArbaazKhan1
Copy link
Contributor

Added zombie and cleaning states to Admin and Thrift. Made methods to handle when the state is set to cleaning or zombie.

closes issue #4843

Comment on lines 472 to 475
if (session.getScanTask() == null) {
state = ScanState.IDLE;
} else {
switch (scanTask.getScanRunState()) {
switch (session.getScanTask().getScanRunState()) {
Copy link
Member

Choose a reason for hiding this comment

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

could store the scan task in a var

@kevinrr888 kevinrr888 added this to the 3.1.0 milestone Oct 17, 2024
Copy link
Member

@kevinrr888 kevinrr888 left a comment

Choose a reason for hiding this comment

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

A couple comments. The current logic doesn't look entirely correct to me but I'm not sure what should be changed.
@keith-turner - do you have any ideas/suggestions on my comments?

Comment on lines -472 to +475
if (scanTask == null) {
state = ScanState.IDLE;
if (session.getState() == State.REMOVED) {
state = ScanState.CLEANING;
} else {
switch (scanTask.getScanRunState()) {
switch (session.getScanTask().getScanRunState()) {
Copy link
Member

Choose a reason for hiding this comment

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

This removes the null check for the scanTask and I think it would still be needed, however, I'm not sure where it would go especially considering my next comment

Comment on lines +483 to +486
if (session.getState() == State.REMOVED) {
state = ScanState.ZOMBIE;
}
break;
Copy link
Member

Choose a reason for hiding this comment

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

The current logic is:

    if (session.getState() == State.REMOVED) {
      state = ScanState.CLEANING;
    } else {
      ...
      if (session.getState() == State.REMOVED) {
        state = ScanState.ZOMBIE;
      }
      ...
    }

state = ScanState.ZOMBIE will never execute in this logic. It seems like either (or both) the logic for identifying ZOMBIE or CLEANING need to be changed (but I'm not sure which or what it should be changed to)

@ctubbsii ctubbsii changed the base branch from 3.1 to main March 13, 2025 23:52
@ctubbsii ctubbsii modified the milestones: 3.1.0, 4.0.0 Mar 13, 2025
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