Bug #2682

Editor results computing executed with not computed parents branch or too long process may lead to display wrong data in editor

Ajouté par Sebastien Jacquot il y a presque 6 ans. Mis à jour il y a plus d'un an.

Statut:Feedback Début:29/11/2019
Priorité:Urgent Echéance:
Assigné à:- % réalisé:

80%

Catégorie:Persistence / Lazy Temps passé: -
Version cible:TXM 0.8.4

Description

WIP SJ:

There are most cases where an editor may seems ready to be used but actually doesn't.
Behavior may be problematic according to the duration of the parents branch computing or duration of the result computing itself.

  • a) reopening a persisted result when its parent branch is not ready
  • b) computing a complex result

In both of these cases, if the duration is too long, the editor widget should be disabled or not opened before the computing has ended.
Otherwise, user can change parameters and run a compute leading to wrong result or simply some crashes due of various reasons.

Example of bug 1

There is a bug in 0.8.0 where the index of partition found nothing if the parent partition parts are not computed yet, typically when reopening TXM.
More information: the problem here is important. When creating an index of partition, the editor opens and the parent and children of parent are computed in background. But since the editor is ready, if we type eg. "faire" before the parts are computed, nothing is found in the index.

Steps to reproduce

=> have a Partition based on a complex query, eg. ELTECFRAORIG_sp_n
=> launch TXM execute Index with "faire" query
=> the editor and console return no results

Solutions to restrict and/or avoid the behavior of case a)

  • ensure the computing of parents branch is done before displaying the editor

SJ: solution has been implemented by running a modal cancelable dialog to block the UI until the needed parents branch is computed.
The editor is not displayed until the process has ended.
NOTE: later, it would be nice to manage a blocking state only for the concerned branch, so the user can still use TXM on other corpora or branches
New issue for this improvement and validation tests: #2746.

Solutions to restrict and/or avoid the behavior of case b)

  • 1) permit only one compute at a time in TXMEditor.Compute() by storing the current computing Job and returns if it's already running
    => will avoid the possibility to get some wrong results when the Partition is not yet computed (eg. typing "faire" in an Index does not return empty result anymore, atm this message is displayed in the console: "Editor is already computing .... Please wait or abort the computing job (Calcul de Index de partition: ELTECFRAORIG_sp_n: ...…).")
    => It doesn't avoid to open another Index
    SJ: this solution 1 has been implemented. Need to translate the log.

* 2) on computing, find a way to disable the editor widgets (or computing button) so the user can not start parallel computing
New issue for about this point here: #2747.

Validation tests

  • create and compute a complex result
  • while computing, change some parameters and click on compute button
    => it should display a console alert
    => when the first compute has ended, the parameter widget values must match the parameters used by the first compute

Demandes liées

lié à Bug #2742: RCP: 0.8.0, TXMEditor parameter toolbar is broken when CQ... Feedback 24/01/2020

Révisions associées

Révision 2558
Ajouté par Sebastien Jacquot il y a plus de 5 ans

Fixes: Deleting a result node doesn't close its result children editors (refs #2679)
Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Révision 2559
Ajouté par Sebastien Jacquot il y a plus de 5 ans

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Révision 2565
Ajouté par Sebastien Jacquot il y a plus de 5 ans

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Révision 2566
Ajouté par Sebastien Jacquot il y a plus de 5 ans

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Révision 2567
Ajouté par Sebastien Jacquot il y a plus de 5 ans

Fixes: Dialog boxes of Sub-corpus and Partition creation are broken when CQP corpus is not ready (refs #2745)
Progresses on: Editor results computing executed with not computed parents branch or too long process may lead to display wrong data in editor (refs #2682)

Révision 2579
Ajouté par Sebastien Jacquot il y a plus de 5 ans

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Révision 2648
Ajouté par Sebastien Jacquot il y a plus de 5 ans

Fixes: Editor results computing executed with not computed parents branch or too long process may lead to display wrong data in editor (refs #2682)

Historique

#1 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Sujet changé de Commands executed on not loaded Partition may lead to wrong results à Commands executed on not loaded Partition may lead to wrong results or TXM crash
  • Description mis à jour (diff)

#2 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#3 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#4 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#5 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#6 Mis à jour par Sebastien Jacquot il y a presque 6 ans

Need to do a new issue about the cqpjni multi-thread access and maybe about the transfer of C++ errors to Java exceptions.
Using synchronized in MemCqiClient may help to reduce crash due to multi-thread access:

    @Override
    public synchronized void cqpQuery(String arg0, String arg1, String arg2)
            throws IOException, UnexpectedAnswerException, CqiServerError {
        if (arg0 == null || arg1 == null || arg2 == null) {
            throw new CqiServerError("cqpQuery called with NULL parameter.");
        }
        Boolean ret = server.cqpQuery(arg0, arg1, arg2);
        // System.out.println("CQPSERVER return: "+ret);
        if (ret == null || !ret) {
            int e = server.getErrorCode();
            // System.out.println("throw exception with cqp error code: "+e);
            throwExceptionFromCqi(e);
        }
    }

#7 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#8 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#9 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Sujet changé de Commands executed on not loaded Partition may lead to wrong results or TXM crash à Commands executed on not loaded Partition may lead to wrong results
  • Description mis à jour (diff)

#10 Mis à jour par Sebastien Jacquot il y a presque 6 ans

New issue about the native crash: http://forge.cbp.ens-lyon.fr/redmine/issues/2697.

#11 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Description mis à jour (diff)
  • Version cible changé de TXM 0.8.2 à TXM 0.8.1
  • % réalisé changé de 0 à 10

#12 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Sujet changé de Commands executed on not loaded Partition may lead to wrong results à Editor results computing executed with not computed parents branch or too long process may lead to display wrong data in editor
  • Description mis à jour (diff)

#13 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Description mis à jour (diff)

#14 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Description mis à jour (diff)

#15 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Description mis à jour (diff)
  • % réalisé changé de 10 à 50

#16 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Description mis à jour (diff)

#17 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Description mis à jour (diff)
  • Statut changé de New à Feedback
  • % réalisé changé de 50 à 80

#18 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Catégorie changé de Development à Persistence / Lazy

#19 Mis à jour par Sebastien Jacquot il y a plus d'un an

  • Version cible changé de TXM 0.8.1 à TXM 0.8.4

Formats disponibles : Atom PDF