Menu

#849 Team projects fail to open in offline mode

4.1
closed-fixed
None
5
2018-09-20
2017-02-02
No

Opening a team project when repository is unavailable (no connection, server is down) results in error message and abortion. Version 3.6 gracefully handled such cases and opened team projects as local.

Discussion

  • Didier Briel

    Didier Briel - 2017-02-02

    And 3.6 switches back to online mode automatically when the connexion is back.

    Didier

     
  • Didier Briel

    Didier Briel - 2017-02-02
    • assigned_to: Alex Buloichik
     
  • Aaron Madlon-Kay

    Based on this email from omegat-dev-tech, offline handling in the new team implementation was skipped with the intention of adding it later.

     

    Last edit: Aaron Madlon-Kay 2017-02-03
  • Lev Abashkin

    Lev Abashkin - 2017-02-06

    I can't access the link you provided (error 403). Maybe there is a plan how you were going to implement it? If it's not very massive I can have a look at the code and help with it.

     
    • Didier Briel

      Didier Briel - 2017-02-06

      I can't access the link you provided (error 403).

      That's normal, that's a private mailing list.
      The message doesn't contain much information:

      Only one commit from /trunk was skipped : "Handle repository offline during
      reload". Need to think should(and how) we switch to offline or no for the
      new team mode implementation.

      Didier

       
  • Lev Abashkin

    Lev Abashkin - 2017-02-06

    I can think of only one inconvenience for end users in dynamic switching between online and offline modes: trying to reconnect the server(s) on every project save would take a lot of time. When the project goes offline due to lost connection with the server(s) the servers should be silently polled in a dedicated thread. So switching to online mode would happen only when the server(s) are known to be alive. If the server(s) were down during last poll, then just save the project in offline mode.

     
    • Didier Briel

      Didier Briel - 2017-02-06

      In 3.6, I don't remember noticing a significant waiting time while offline.

      Didier

       
      • Lev Abashkin

        Lev Abashkin - 2017-02-06

        I had bad experience with GitLab. It's slow and sometimes is offline. Of course this example shouldn't be considered as a rule.

         
        • Alex Buloichik

          Alex Buloichik - 2017-02-09

          Sorry, I will not have time for testing to the end of February.
          But changes shouldn't be too hard:
          1) Need to check online mode on the every check
          RealProject.remoteRepository != null
          2) change online mode only inside executeExclusively
          3) set RealProject.preparedStatus to NONE on every change online mode

           

          Last edit: Aaron Madlon-Kay 2018-07-04
  • Aaron Madlon-Kay

    Alex, Lev is working on this issue. Shall I reassign this ticket to him?

     
  • Aaron Madlon-Kay

    • assigned_to: Alex Buloichik --> Lev Abashkin
     
  • Aaron Madlon-Kay

    Alex confirmed by email that Lev can have this ticket.

    Lev, please take a look at Alex's comment above and adjust your PR as appropriate.

     
  • Lev Abashkin

    Lev Abashkin - 2018-07-06

    There are three methods in RealProject which check for remote remoteRepositoryProvider, and these methods don't seem to be used anythere. They are compileProjectAndCommit, teamSyncPrepare and teamSync. I don't really know what to do with them.

     
    • Didier Briel

      Didier Briel - 2018-07-14

      compileProjectAndCommit is used in
      ProjectUICommands.java
      840:  Core.getProject().compileProjectAndCommit(".*", true, true);
      and in RealProject.java
      570:  compileProjectAndCommit(sourcePattern, doPostProcessing, false);

      teamSynPrepare is used in SaveThread.java
      106:  dataEngine.teamSyncPrepare();

      teamSync is used in EditorController.java
      1243:  Core.executeExclusively(false, Core.getProject()::teamSync);

      Didier

       
      • Lev Abashkin

        Lev Abashkin - 2018-07-14

        Thanks, Didier. For some reason IDEA couldn't find any usage for these methods.

         
        • Didier Briel

          Didier Briel - 2018-07-15

          I found them using "Find Usage" in NetBeans.

          Didier

           
  • Aaron Madlon-Kay

    • status: open --> open-fixed
     
  • Aaron Madlon-Kay

    Committed to trunk, [r10462].

     

    Related

    Commit: [r10462]

  • Didier Briel

    Didier Briel - 2018-09-20
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2018-09-20

    Closed in the released version 4.1.5 update 2 of OmegaT.

    Didier

     

Log in to post a comment.

MongoDB Logo MongoDB