Skip to content

show lost tabletIds which do not have any available replica#4095

Closed
spaces-X wants to merge 1 commit intoapache:masterfrom
spaces-X:lostTablet
Closed

show lost tabletIds which do not have any available replica#4095
spaces-X wants to merge 1 commit intoapache:masterfrom
spaces-X:lostTablet

Conversation

@spaces-X
Copy link
Contributor

Add tabletIds without available replica in system info page, to improve the monitoring information.

@morningman
Copy link
Contributor

Compile failed:
[ERROR] /home/palo-ci/teamcity/TeamCity/buildAgent/work/3e3628d3d06a368d/fe/src/main/java/org/apache/doris/catalog/Tablet.java:42:8: 无用导入 - java.util.Collections 。 [UnusedImports]

this.unhealthyTabletIds = unhealthyTabletIds;
this.inconsistentTabletIds = inconsistentTabletIds;
this.cloningTabletIds = cloningTabletIds;
this.noavlreplicaTabletIds = noavlreplicaTabletIds;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
this.noavlreplicaTabletIds = noavlreplicaTabletIds;
this.noAvlreplicaTabletIds = noAvlreplicaTabletIds;

}

// find tablet with no available replica;
if (!tablet.hasAvailableReplica(infoService, partition.getVisibleVersion(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can just add a new enum value in TabletStatus, for example, NO_AVAILABLE_REPLICA, and return it by calling getHealthStatusWithPriority() above. So that we can save some iteration.

But adding new enum value in TabletStatus may affect other code, which is uncontrollable. So I suggest to add a new parameter in getHealthStatusWithPriority(), eg, getHealthStatusWithPriority(..., bool returnNoAvlExplicit).
And if returnNoAvlExplicit is true, it return return NO_AVAILABLE_REPLICA explicit.

@spaces-X
Copy link
Contributor Author

Done @morningman

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman
Copy link
Contributor

HI @spaces-X the FE code structure has been change, please rebase the code the solve the conflicts.

@morningman
Copy link
Contributor

This is already supported #6045

@morningman morningman closed this Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants