[MGNLUI-3377] Availability check on multi action blocks UI Created: 17/Mar/15  Updated: 15/Mar/21  Resolved: 15/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: app framework
Affects Version/s: 5.3.7
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jan Haderka Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Having none destructive (such that preserves selection) action that can be applied to multiple items will block UI for given user and send CPU on server to 100% usage.

To reproduce:

  • select number of items in the workbench
  • execute some non destructive multiaction on them (Create one if you don't have anything ready, it doesn't have to do absolutely anything)
  • after exectution of the action, TreePresenter will collect all selected items and fire SelectionChangedEvent on them in
    TreePresenter:144
            eventBus.fireEvent(new SelectionChangedEvent(Collections.unmodifiableSet(new HashSet<Object>(selectedItemIds))));
    
  • this in turn will force evaluation of ALL actions configured in the app on EACH item ... if you have anywhere around 100 items selected, you can go for coffee before availability for all is checked ... you can use your App/DB server cpu to heat up that coffee too
  • code triggered by the action gets stuck in
    info.magnolia.ui.framework.availability.AvailabilityCheckerImpl.isAvailable(AvailabilityDefinition, List<Object>)
            while (isAvailable && ruleIterator.hasNext()) {
                AvailabilityRule rule = ruleIterator.next();
                boolean ruleHolds = rule.isAvailable(idsToCheck);
                isAvailable &= ruleHolds;
            }
    


 Comments   
Comment by Jan Haderka [ 15/Mar/21 ]

Doesn't appear to be a problem on 6.2.6

Generated at Mon Feb 12 09:06:00 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.