Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6804

Print a warning if HashMap is passed into bulk update operations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 2.9
    • cache
    • Print development warning of deadlock when unordered collection is passed to putAll-style bulk cache operation.

    Description

      Ignite newcomers tend to stumble on deadlocks simply because the keys are passed in an unordered HashMap. Propose to do the following:

      • update bulk operations Java docs.
      • print out a warning if not SortedMap (e.g. HashMap, Weak/Identity/Concurrent/Linked HashMap etc) is passed into
        a bulk method (instead of SortedMap) and contains more than 1 element. However, we should make sure that we only print that warning once and not every time the API is called.
      • do not produce warning for explicit optimistic transactions

      More details are here:
      http://apache-ignite-developers.2346864.n4.nabble.com/Re-Ignite-2-0-0-GridUnsafe-unmonitor-td23706.html

      Attachments

        Issue Links

          Activity

            People

              ilyak Ilya Kasnacheev
              dmagda Denis A. Magda
              Andrey N. Gura Andrey N. Gura
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h 20m
                  5h 20m