• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Low Low
    • 3.1.12
    • 3.1.8
    • CIJ Plugin
    • None

      probably there are two possible ways to interact with build server process and the IDEA IDE process:

      1) build server performs (parallel) instrumentation in memory and at the end of the whole build writes or updates clover.db (it has write access); next it sends notification to IDE which refreshes views and editors; potential problems: deletion of database during build, locking files

      2) build server performs (parallel) instrumentation sending information about code structure back to IDEA IDE, which manages the database and sends back indexes of elements; potential problems: high messaging overhead -> need to send at most one message per file -> need to introduce local offset constant per each file;

            [CLOV-1266] Check how clover.db can be accessed from build server and IDE processes at once

            approach #1 will be used. Clover-for-IDEA fetches whole model from clover.db into memory, so the read access is performed only once - after the build is finished - and we've got a notification from JPS builder about it. We can use events executed in UI thread to update necessary stuff.

            Scenario yet to be checked: run external build, click 'delete database' in UI, see what happens; I predict:

            • database is loaded again after build is finished
            • deletion fails (at the time when JSP creates a locks a file) - any error message in UI? ignore the problem?
            • closing instrumentation session fails (at the time when file is being deleted from IDE - file is locked - the JPS will try to open it and append new instrumentation session)

            Marek Parfianowicz added a comment - approach #1 will be used. Clover-for-IDEA fetches whole model from clover.db into memory, so the read access is performed only once - after the build is finished - and we've got a notification from JPS builder about it. We can use events executed in UI thread to update necessary stuff. Scenario yet to be checked: run external build, click 'delete database' in UI, see what happens; I predict: database is loaded again after build is finished deletion fails (at the time when JSP creates a locks a file) - any error message in UI? ignore the problem? closing instrumentation session fails (at the time when file is being deleted from IDE - file is locked - the JPS will try to open it and append new instrumentation session)

              mparfianowicz Marek Parfianowicz
              mparfianowicz Marek Parfianowicz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: