Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7956

Investigate removing PartitionHandlingInterceptor

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 9.1.0.Final
    • Core
    • None

      When all the owners of a key leave the cluster, the distribution interceptor doesn't know how to handle that key. Instead, it has to signal that to the PartitionHandlingInterceptor somehow, and PHI decides whether to return a null value or throw an AvailabilityException.

      Single-key read commands and write commands are handled by throwing an AllOwnersLostException (initially an RpcException) from the distribution interceptor and catching it in PartitionHandlingInterceptor. If partitioning handling is disabled, the AllOwnersLostException is instead caught by StateTransferInterceptor, which returns the null value (for read commands) or waits for a new topology and retries (for write commands).

      For multi-key read commands the distribution interceptor can't throw an exception, because that would lose the values that were retrieved successfully. For GetAllCommand we could get away with storing the values in the context, but that wouldn't work for functional commands because they transform the values on the remote node. ISPN-7884 removing the values with missing owners from the result collection, but that means values that are simply missing have to be treated differently, and StateTransferInterceptor has to iterate through the list of results again in order to remove them.

      It should be simpler to move all the availability checks to the distribution interceptor, and remove the PartitionHandlingInterceptor. DI already calls some PartitionHandlingManager methods directly, in order to keep track of partially committed transactions.

            Unassigned Unassigned
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: