swagger-samples icon indicating copy to clipboard operation
swagger-samples copied to clipboard

Add guards around structures to prevent racing.

Open antihax opened this issue 7 years ago • 2 comments

@wing328 From what I can tell, there are races around the data structures here when hit concurrently.

Please review and make sure my use of Collections.synchronizedList and synchronized are correct. I have not written anything in Java for some time.

I have these changes running locally with go test on a loop and beefed up the concurrency significantly in the go tests. Running 30 minutes with no failures now. This should resolve swagger-codegen #5102.

antihax avatar Mar 17 '17 16:03 antihax

@antihax thanks for the PR. Can you submit it against my repo instead: https://github.com/wing328/swagger-samples ? That way we can more easily test and deploy.

wing328 avatar Mar 17 '17 17:03 wing328

updated based on review. I will see if i can figure out to submit to your repo.

antihax avatar Mar 17 '17 18:03 antihax