Project

General

Profile

bug #8842

CdmServiceRequestExecutor is not stateleass and neither thread save nor access synchronized

Added by Andreas Kohlbecker 8 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Highest
Category:
taxeditor
Target version:
Start date:
02/04/2020
Due date:
% Done:

50%

Severity:
critical
Found in Version:

Description

CdmServiceRequestExecutor uses the field

private RemoteInvocation currentRemoteInvocation;

to remember the invocation between the step of serializing the request data and of sending the request in the method AbstractHttpInvokerRequestExecutor.executeRequest(HttpInvokerClientConfiguration config, RemoteInvocation invocation)
This method is final and thus can not be overwritten. As workaround currentRemoteInvocation has apparently been introduced in CdmServiceRequestExecutor. This fields, however, causes this bean to be no longer stateless.
Concurrent access from multiple threads can cause things to get mixed up. As consequence cdm entities could be stored in the wrong "session"-cache and the application could miss finding entities in the cache causing them to be loaded twice. This second situation can be a root cause for MultipleRepresentationExceptions


Related issues

Related to Edit - bug #8843: Revise term caching New 02/05/2020
Related to Edit - bug #8812: Connection losses in taxeditor HTTP invoker (RemoteAccessException: Could not access HTTP invoker remote service at ...) Resolved 01/16/2020

Associated revisions

Revision 1c21abc1 (diff)
Added by Andreas Kohlbecker 8 months ago

ref #8842 replacing caching in CdmServiceRequestExecutor by CachingHttpInvokerProxyFactoryBean to avoid having states

Revision e2bff0b1 (diff)
Added by Andreas Kohlbecker 8 months ago

ref #8842 claning up - removing obsolete classes and renaming

History

#1 Updated by Andreas Kohlbecker 8 months ago

  • Description updated (diff)

#2 Updated by Andreas Kohlbecker 8 months ago

  • Description updated (diff)
  • Status changed from New to In Progress

#3 Updated by Andreas Kohlbecker 8 months ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 0 to 50

The taxeditor|1c21abc1 most probably removed at least two potential root causes for MultipleRepresentation problems:

  1. problems caused by the satefulness during concurrent asynchronous access to the CdmServiceRequestExecutor as described above.

  2. CdmServiceRequestExecutor.java#77

UpdateResult result = (UpdateResult)rir.getValue();
if(result.isOk()){
    cdmEntitySessionManager.load(result, true);
}

The UpdateResult was put into the cache instead of result.getCdmEntity(), so the entity has been omitted since UpdateResult is not handled in the CacheLoader

#4 Updated by Andreas Kohlbecker 8 months ago

  • Related to bug #8843: Revise term caching added

#5 Updated by Andreas Kohlbecker 8 months ago

  • Related to bug #8812: Connection losses in taxeditor HTTP invoker (RemoteAccessException: Could not access HTTP invoker remote service at ...) added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)