<fix>[zbs]: refresh snapshot size by timer and manual query#4396
<fix>[zbs]: refresh snapshot size by timer and manual query#4396zstack-robot-2 wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (21)
Warning
|
04e7a2f to
16071bf
Compare
During the scheduled active-volume size sync, primary storages whose snapshot mode is COPY_ON_WRITE attach snapshot install paths to BatchSyncVolumeSizeOnPrimaryStorageMsg. The batch volume sync reply then carries snapshot actual sizes so VolumeSnapshotVO.size can be refreshed together with volume actual size. Use BatchStatsSpec and StorageResourceStats for external primary storage batchStats so one scheduled batch call can return both VolumeStats and VolumeSnapshotStats. REDIRECT_ON_WRITE snapshot storages keep volume-only batch sync. Single-volume stats and SyncVolumeSize remain volume-only flows. Use VolumeSnapshotSizeSyncHelper as a lightweight helper object with CloudBus and DatabaseFacade dependencies passed by constructor. Snapshot size sync is decided by reported snapshot mode instead of primary storage type. Route ZBS COPY_ON_WRITE withSnapshot batch stats to the volume-with-snapshot agent API. Test: git diff --check Test: mvn -pl storage,plugin/zbs,plugin/xinfini,plugin/expon -am -DskipTests compile Verified: - In cloud environment, zstack-cli BatchSyncVolumeSize clusterUuid=<clusterUuid> triggers the same batch volume size sync path as the scheduled task and updates ZBS COPY_ON_WRITE VolumeSnapshotVO.size from backend usedSize. Resolves: ZSTAC-67903 Change-Id: I66339da9d8cede3dd9fa4e5e262cc01a3784ba6e
16071bf to
fec68a9
Compare
Add external primary storage snapshot size query support so manual
snapshot size refresh can fetch the latest ZBS snapshot usedSize from
the agent. XInfini and Expon keep returning the stored DB snapshot size.
Refresh related snapshot sizes before updating volume actual size in
single-volume and batch active-volume size sync paths. This lets the
periodic VolumeSizeTracker update ZBS snapshot usedSize when it scans
active volumes, and keeps manual volume size refresh using the same
snapshot refresh flow.
Test: git diff --check
Test: mvn -pl storage,plugin/zbs,plugin/xinfini,plugin/expon -am -DskipTests compile
Test: mvn -pl storage,plugin/zbs,plugin/xinfini,plugin/expon -am -DskipTests package
Verified:
storage nodes 172.24.193.131 / 172.24.195.92 / 172.24.251.24.
triggers snapshot size refresh before volume size refresh, and the
management node calls /zbs/primarystorage/snapshot/getsize on the ZBS
agent.
Resolves: ZSTAC-67903
sync from gitlab !10356