Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.0
    • Fix Version/s: 1.2.0, 1.3.0
    • Component/s: Webfrontend
    • Labels:
      None

      Description

      The WebUI maintains a list of selected metrics for all jobs and vertices. When a metric is selected in the metric screen it is added to this list, and removed if it is unselected.

      The contents of this list are stored in the browser's localStorage. This allows a user to setup a metric screen, move to another page, and return to the original screen completely intact.

      However, if the metrics are never unselected by the user they will remain in this list. They will also still be in this list if the WebUI can't even display the corresponding job page anymore, if for example the history size limit was exceeded. They will even survive a browser restart, since they are not stored in a session-based storage.

      Furthermore, the WebUI still tries to update these metricsd, adding additional overhead to the WebBackend and potentially network.

      In other words, if you ever checked out metrics tab for some job, chances are that the next time you start the WebInterface it will still try to update the metrics for it.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user zentol opened a pull request:

          https://github.com/apache/flink/pull/3104

          FLINK-5150 [webui] Store metrics in sessionStorage

          This PR modifies the webfrontend to no longer store the metrics setup (selected metrics + their values) in localStorage but sessionStorage instead.

          Using localStorage means that data is never deleted unless explicitly told. It survives moving across pages, but also browser restarts. We currently lack an automatic explicit removal, which was problematic since metrics for previous jobs (that may even have been executed on a completely different cluster) were still being updated. For example, if i ran any job on my local machine it would fire 30+ requests regularly for dead metrics.

          By moving to sessionStorage this issue is solved since the data is cleared when the page is closed. However, you can still navigate to other pages and the setup will survive. As a bonus you can now have 2 tabs for the same task with different metric setups!

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/zentol/flink 5150_webui_rl

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3104.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3104


          commit bb0415c2e879e3a2b5e977484c529d3d6a94c657
          Author: zentol <chesnay@apache.org>
          Date: 2017-01-12T12:12:24Z

          FLINK-5150 [webui] Store metrics in sessionStorage


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user zentol opened a pull request: https://github.com/apache/flink/pull/3104 FLINK-5150 [webui] Store metrics in sessionStorage This PR modifies the webfrontend to no longer store the metrics setup (selected metrics + their values) in localStorage but sessionStorage instead. Using localStorage means that data is never deleted unless explicitly told. It survives moving across pages, but also browser restarts. We currently lack an automatic explicit removal, which was problematic since metrics for previous jobs (that may even have been executed on a completely different cluster) were still being updated. For example, if i ran any job on my local machine it would fire 30+ requests regularly for dead metrics. By moving to sessionStorage this issue is solved since the data is cleared when the page is closed. However, you can still navigate to other pages and the setup will survive. As a bonus you can now have 2 tabs for the same task with different metric setups! You can merge this pull request into a Git repository by running: $ git pull https://github.com/zentol/flink 5150_webui_rl Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3104.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3104 commit bb0415c2e879e3a2b5e977484c529d3d6a94c657 Author: zentol <chesnay@apache.org> Date: 2017-01-12T12:12:24Z FLINK-5150 [webui] Store metrics in sessionStorage
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user uce commented on the issue:

          https://github.com/apache/flink/pull/3104

          Good catch!

          Show
          githubbot ASF GitHub Bot added a comment - Github user uce commented on the issue: https://github.com/apache/flink/pull/3104 Good catch!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/3104

          This seems crucial, +1 to add it to 1.2 and master

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/3104 This seems crucial, +1 to add it to 1.2 and master
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zentol commented on the issue:

          https://github.com/apache/flink/pull/3104

          Merging with the next batch.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zentol commented on the issue: https://github.com/apache/flink/pull/3104 Merging with the next batch.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3104

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3104
          Hide
          Zentol Chesnay Schepler added a comment -

          master: cbd933bd1def789d1978be5349005dd7d9de3082
          1.2: 79b68263f52690697ceec0528023d35feed0bd89

          Show
          Zentol Chesnay Schepler added a comment - master: cbd933bd1def789d1978be5349005dd7d9de3082 1.2: 79b68263f52690697ceec0528023d35feed0bd89

            People

            • Assignee:
              Zentol Chesnay Schepler
              Reporter:
              Zentol Chesnay Schepler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development