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

Add topic and partition statuses #219

Merged
merged 7 commits into from
Dec 7, 2023
Merged

Add topic and partition statuses #219

merged 7 commits into from
Dec 7, 2023

Conversation

MikeEdgar
Copy link
Member

@MikeEdgar MikeEdgar commented Nov 28, 2023

Some initial experimentation with topic/partition statuses and handling offline partitions. PR targets #171 , but will be updated to main later.

Partition Status Topic Status
Offline : leader is missing Offline : all partitions Offline
PartiallyOffline : has Offline partitions
UnderReplicated : has out-of-sync replica UnderReplicated : has UnderReplicated partitions
FullyReplicated FullyReplicated

Because the Admin client cannot fetch offsets for any partition of a topic where any of the partitions are offline, the API will not attempt to do so for Offline or PartiallyOffline topics. Similarly, replica localStorage will only be fetched for online partitions.

With one broker stopped:
image

Topic a_3 with replication factor of 1 has no leader (i.e. offline)
image

Broker restarted:
image

Base automatically changed from cluster-metrics to main December 1, 2023 14:09
@MikeEdgar MikeEdgar force-pushed the api-topic-status branch 3 times, most recently from bf682a2 to 2b8eb01 Compare December 4, 2023 15:02
@MikeEdgar MikeEdgar marked this pull request as ready for review December 4, 2023 21:48
@MikeEdgar MikeEdgar changed the title WIP: Add topic and partition statuses Add topic and partition statuses Dec 4, 2023
@MikeEdgar MikeEdgar marked this pull request as draft December 4, 2023 21:48
@MikeEdgar MikeEdgar marked this pull request as ready for review December 5, 2023 18:09
Copy link
Collaborator

@riccardo-forina riccardo-forina left a comment

Choose a reason for hiding this comment

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

Thanks for this and for changing the to bits as well!

I left a single question, but LGTM

Copy link

sonarqubecloud bot commented Dec 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

91.0% 91.0% Coverage
0.0% 0.0% Duplication

@MikeEdgar MikeEdgar added this to the 0.0.17 milestone Dec 7, 2023
@MikeEdgar MikeEdgar merged commit a7a0692 into main Dec 7, 2023
@MikeEdgar MikeEdgar deleted the api-topic-status branch December 7, 2023 12:09
@MikeEdgar MikeEdgar linked an issue Dec 7, 2023 that may be closed by this pull request
@shirimordechay
Copy link

  • Is there a way that we could show a tooltip (to the status) with the exact number of under-replicated/ offline partitions?
  • I think Offline should be Error (red) instead of warning
  • Tooltip text for the status column:
    Indicates the replication status of Kafka partitions. A partition is fully replicated when its replicas (followers) are 'in sync' with the designated partition leader. A partition is under-replicated if partition replicas (followers) are not 'in sync with their designated partition leader. If the status shows unavailable, some or all partitions are currently unavailable due to underlying issues.

@MikeEdgar
Copy link
Member Author

Is there a way that we could show a tooltip (to the status) with the exact number of under-replicated/ offline partitions?

The individual status codes for each partition are available in the response from the backend API, so I think this could be done. << @riccardo-forina w.d.y.t?

I think Offline should be Error (red) instead of warning

That makes sense, any change in icon?

Tooltip text for the status column:
Indicates the replication status of Kafka partitions. A partition is fully replicated when its replicas (followers) are 'in sync' with the designated partition leader. A partition is under-replicated if partition replicas (followers) are not 'in sync with their designated partition leader. If the status shows unavailable, some or all partitions are currently unavailable due to underlying issues.

This should be fine, we can add this along with the other planned tooltips 👍

@shirimordechay
Copy link

shirimordechay commented Dec 13, 2023

See the example for the number of under-replicated https://miro.com/app/board/uXjVNbMAIcU=/?moveToWidget=3458764572936405853&cot=14. we can also address this in the mockup doc for prioritization if it is not trivial to implement.

Yes, the icon should be:
fa-exclamation-circle--
(Unicode: f06a)

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.

Include a basic topic status
3 participants