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

ScanQuery ignore readFromBackups

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4
    • None
    • None
    • None

    Description

      1) Create partitioned cache with backups and readFromBackup(false) on 2+ nodes cluster
      2) Select some partition N, local node should not be primary of partition N
      3) execute: cache.query(new ScanQuery<>().setLocal(true).setPartition(N))
      Expected result:
      empty result (probaply with logging smth like "Trying to execute local query <query> by primarypartitions with non pridmary local partition N") or even throw exception
      Actual result:
      executing (with ScanQueryFallbackClosableIterator) query on local node ignoring readFromBackups flag.
      Problem is that we execute query on backup partitions even if readFromBackups explicitly set to false.
      This happen because in IgniteCacheProxyImpl.query(ScanQuery, IgniteClosure, ClusterGroup) we create GridCacheQueryAdapter (=ctx.queries()createScanQuery...) without pass readFromBackups flag into includeBackups in GridCacheQueryAdapter, and, moreover, in GridCacheQueryManager.scanQueryLocal(GridCacheQueryAdapter, boolean) we create scanIterator not padyint attention to this flag if partition is set.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sbberkov Alexander Belyak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: