Fixing Concurrency Issues with TypeMapper
1 unresolved thread
1 unresolved thread
test case demonstrating a thread-unsafe operation of IndexerMappingServiceImpl.getIndexMappingFromRecordSchema(..) and the fix for that
Conflicts:
indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerMappingServiceImpl.java
Merge request reports
Activity
requested review from @nthakur
added 1 commit
- da7945cd - test case demonstrating a thread-unsafe operation of...
@osdu/platform/roles/aws-contributors @ydzeng can you please help with the pipeline, deployment is failing for service?
@chad I did not realize this change was never merged.
@sabarishk can you please confirm if we still need it. Based on our earlier conversation, it seemed critical.
reset approvals from @nthakur by pushing to the branch
225 231 } 226 232 233 @Test 234 public void should_returnCorrectMapping_duringConcurrentCalls() throws Exception { 235 236 /* We attempt to call the function IndexerMappingServiceImpl.getIndexMappingFromRecordSchema concurrently for 237 * two differ kinds concurrently. You can observe that this operation is not threadsafe, and one of the two 238 * responses will have an incorrect value for the authority. Kind 1 either has Kind 2's authority or vice-versa. 239 */ 240 241 Gson gson = new GsonBuilder().serializeNulls().create(); 242 ExecutorService executor = Executors.newFixedThreadPool(10); 243 244 int totalRuns = 10; 245 for (int x = 0; x < totalRuns; x++) { 246 System.out.println(String.format("------- Run %d/%d ----", (x + 1), totalRuns));
Please register or sign in to reply