Skip to content

network load status - #1067

Open
ghazwarhili wants to merge 2 commits into
mainfrom
razwa/implement-network-load-status
Open

network load status#1067
ghazwarhili wants to merge 2 commits into
mainfrom
razwa/implement-network-load-status

Conversation

@ghazwarhili

Copy link
Copy Markdown
Contributor

PR Summary

network load status

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b6e1d165-7a24-4c78-80fb-eb266d268388


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@Meklo Meklo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It might be worth to also add or tweak a reindexation test to check if the study goes through UNLOADED -> LOADED status

}

@Transactional(readOnly = true)
public List<UUID> getLoadedStudyUuids(List<UUID> studyUuids) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Better fitted in StudyService no ? It may have other usages outside of supervision scope

@GetMapping(value = "/studies/loaded")
@Operation(summary = "Get the study uuids whose network is currently loaded")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "List of the study uuids whose network is currently loaded")})
public ResponseEntity<List<UUID>> getLoadedStudies(@Parameter(description = "Study uuids to filter") @RequestParam("ids") List<UUID> studyUuids) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could be moved to study controller as well no ?

Comment on lines +3004 to 3012
self.updateNetworkLoadStatus(studyUuid, NetworkLoadStatus.UNLOADING);
var rootNodeUuid = networkModificationTreeService.getStudyRootNodeUuid(studyUuid);
// First we unbuild all nodes
doUnbuildNodeTree(studyUuid, rootNodeUuid, true, true, userId);
// Then we erase data linked to root node on all root networks
rootNetworkService.invalidateRootNetworkRemoteInfos(List.of(rootNetworkService.getRootNetworkInfos(rootNetworkUuid)), true, false);
rootNetworkService.updateRootNetworkIndexationStatus(studyUuid, rootNetworkUuid, RootNetworkIndexationStatus.NOT_INDEXED);
self.updateNetworkLoadStatus(studyUuid, NetworkLoadStatus.UNLOADED);
notificationService.emitRootNetworksUpdated(studyUuid);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Those load status update might be better placed in one level above in invalidateStudy. Otherwise the study will switch to UNLOADING multiple times during an invalidation with multiple root networks. Also, in a multi root network situation, a study might have the UNLOADED status even if some root networks failed to unload

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.

2 participants