Bug #2682

Commands executed on not loaded Partition may lead to wrong results

Added by Sebastien Jacquot about 1 month ago. Updated 2 days ago.

Status:New Start date:11/29/2019
Priority:Urgent Due date:
Assignee:- % Done:

10%

Category:Development Spent time: -
Target version:TXM 0.8.1

Description

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 this behavior

  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.

History

#1 Updated by Sebastien Jacquot about 1 month ago

  • Subject changed from Commands executed on not loaded Partition may lead to wrong results to Commands executed on not loaded Partition may lead to wrong results or TXM crash
  • Description updated (diff)

#2 Updated by Sebastien Jacquot about 1 month ago

  • Description updated (diff)

#3 Updated by Sebastien Jacquot about 1 month ago

  • Description updated (diff)

#4 Updated by Sebastien Jacquot about 1 month ago

  • Description updated (diff)

#5 Updated by Sebastien Jacquot about 1 month ago

  • Description updated (diff)

#6 Updated by Sebastien Jacquot about 1 month ago

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 Updated by Sebastien Jacquot about 1 month ago

  • Description updated (diff)

#8 Updated by Sebastien Jacquot about 1 month ago

  • Description updated (diff)

#9 Updated by Sebastien Jacquot about 1 month ago

  • Subject changed from Commands executed on not loaded Partition may lead to wrong results or TXM crash to Commands executed on not loaded Partition may lead to wrong results
  • Description updated (diff)

#10 Updated by Sebastien Jacquot about 1 month ago

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

#11 Updated by Sebastien Jacquot 2 days ago

  • Description updated (diff)
  • Target version changed from TXM 0.8.2 to TXM 0.8.1
  • % Done changed from 0 to 10

Also available in: Atom PDF