Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-1303

CqServiceImpl.processEntryEvent(CacheEvent, Profile, Profile[], FilterRoutingInfo)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • offheap

    Description

      Currently CqServerImpl.processEntryEvent copies each off-heap value it adds to cqUnfilteredEventsSet_newValue to the heap in this code:
      if (cqUnfilteredEventsSet_newValue.isEmpty() && (event.getOperation().isCreate() || event.getOperation().isUpdate())) {
      Object newValue = entryEvent.getNewValue(); // TODO OFFHEAP: optimize by not copying the value on to the heap
      if (newValue != null)

      { //We have a new value to run the query on cqUnfilteredEventsSet_newValue.add(newValue); }

      }
      The cqUnfilteredEventsSet_newValue does not live past this method call. The values in it are later passed to evaluateQuery.

      It would be nice if we didn't need to copy the values to the heap in this code. It would be easy enough to retain them and then release everything in cqUnfilteredEventsSet_newValue in a finally block. But can evaluateQuery handle an offheap reference? If so then this would be a nice optimization for cqs on offheap regions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dschneider Darrel Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: