COMET-IME-Community-Edition icon indicating copy to clipboard operation
COMET-IME-Community-Edition copied to clipboard

Possible to create conflicting order keys in PossibleFiniteStateLists

Open alexatstariongroup opened this issue 3 years ago • 6 comments

Prerequisites

  • [x] I have written a descriptive issue title
  • [x] I have verified that I am running the latest version of the COMET-IME
  • [x] I have searched open and closed issues to ensure it has not already been reported

Description

Uncertain how, but one case of manually creating conflicting order keys of of PossibleFiniteStates in PossibleFiniteStateLists resulting in total inability to load an iteration again in IME or the Addin has been observed in the CDF.

After this, the only resolution os manually editing the keys in the db.

Solution:

  • SDK: make sure duplicate keys are not created, and before sending a POST, make sure in the updated objects the keys are all different
  • webservices: in a side-effect, check that the keys will all be different. If this is not the case, return a InvalidOperation exception (or something similiar) that translates into an intelligeable HTTP error message, so not an internal server error.
  • Add Integration tests (Check for duplicate keys).
  • Try to fix it in the OrderedItemList in the SDK, so all OrderedItemLists will be fixed.

Steps to Reproduce

Logs

  • [ ] There are no logs regarding the issue
  • { ] I have attached a log file or included the relevant section in this issue

System Configuration

  • COMET version:
    • [ ] COMET-IME:
    • [ ] Other:
  • Web Services:
    • [ ] CDP4/COMET Web Services version:
    • [ ] OCDT WSP version:
  • Environment (Operating system, version and so on):
    • [ ] Microsoft Excel (32/64 bit):
    • [ ] Windows OS (32/64 bit):
    • [ ] Additional information:

alexatstariongroup avatar Feb 11 '22 08:02 alexatstariongroup

I think this needs to be resolved in 2 places:

  • SDK: make sure duplicate keys are not created, and before sending a POST, make sure in the updated objects the keys are all different
  • webservices: in a side-effect, check that the keys will all be different. If this is not the case, return a InvalidOperation exception (or something similiar) that translates into an intelligeable HTTP error message, so not an internal server error.

samatstariongroup avatar Feb 11 '22 08:02 samatstariongroup

Agreed, it needs to be checked and monitored in various places.

alexatstariongroup avatar Feb 11 '22 08:02 alexatstariongroup

Confirmed again as a critical issue during use of COMET; reordering of finite states may lead to inaccessibility of the model in the IME, with low-level database fixes as the only option to recover. We will try and help to find the culprit use-case that causes this phenomenon.

nlmave avatar Nov 16 '22 14:11 nlmave

@nlmave We managed to reproduce the issue and are working on a solution.

lxatstariongroup avatar Nov 17 '22 15:11 lxatstariongroup

@nlmave We fixed the cause of the problem in the new COMET WebServices version. SDK has also been updated to be used in the COMET IME, to make sure that loading a model doesn't crash the application. COMET IME itself needs an update to reflect these changed, but the most important thing: The root cause has been handled in the COMET Webservices: Webservice release 7.1.0

lxatstariongroup avatar Nov 23 '22 12:11 lxatstariongroup

As discussed yesterday with @lxatrhea , testing on our side reveals that issue is still present in Webservices 7.1.0.

nlmave avatar Dec 07 '22 09:12 nlmave