-
Notifications
You must be signed in to change notification settings - Fork 17
fix: use both BSC and Whiteboard for disks #1564
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
Conversation
d867fc7 to
6012e33
Compare
| if (!isFullVDiskData(vDisk)) { | ||
| return NOT_AVAILABLE_SEVERITY; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't needed, in this case function will return NOT_AVAILABLE_SEVERITY because disk lacks VDiskState
6012e33 to
4f08ff4
Compare
| label: 'Available', | ||
| value: `${bytesToGB(AvailableSize)} of ${bytesToGB(TotalSize)}`, | ||
| }); | ||
| if (!isNaN(Number(TotalSize))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isNumeric ?
| groups?.forEach((group) => { | ||
| const vDisks = group.VDisks?.filter((el) => el.NodeId === nodeId).map( | ||
| prepareVDiskData, | ||
| prepareWhiteboardVDiskData, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we use only whiteboard data here (without bsc) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's data received from viewer/storage endpoint, it has only whiteboard data (TVDiskStateInfo)
| const pDisks = node.PDisks?.map((pDisk) => { | ||
| return { | ||
| ...preparePDiskData(pDisk), | ||
| ...prepareWhiteboardPDiskData(pDisk), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use only whiteboard data and don't use bsc data here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In prepareStorageNodeData we prepare data that is received from viewer/nodes, it has only whiteboard data (TPDiskStateInfo )
src/utils/disks/prepareDisks.ts
Outdated
| : undefined; | ||
|
|
||
| const PDiskId = vdiskState.PDiskId ?? PDisk?.PDiskId; | ||
| const actualPDiskId = PDiskId ?? PDisk?.PDiskId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect that preparedPDisk contains actial Id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be no PDisk inside VDisk in some cases. For example, for viewer/nodes endpoint VDisks and PDisks are located in separate fields
| const Donors = vdiskState.Donors?.map((donor) => { | ||
| return prepareVDiskData({...donor, DonorMode: true}); | ||
| const preparedDonors = Donors?.map((donor) => { | ||
| return prepareWhiteboardVDiskData({...donor, DonorMode: true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use only whiteboard data here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prepareWhiteboardVDiskData is used to prepare TVDiskStateInfo, donors inside TVDiskStateInfo have TVDiskStateInfo type, so the same function is used.
The same is for storage/groups response, vdisks there have type TStorageVDisk, donors have type TStorageVDisk as well, the same prepareGroupsVDisk function is used for both vdisk and its donors
Closes #1457, closes #1428, closes #1429
UI should work as before, PR covers cases of DC shutdown
Stand: https://nda.ya.ru/t/dvb-Acis79L6xg
CI Results
Test Status: β FAILED
π Full Report
Bundle Size: πΊ
Current: 79.21 MB | Main: 79.20 MB
Diff: +0.01 MB (0.01%)
βΉοΈ CI Information