| Summary: | Unpredictable results when one GLA instance runs multiple adapters concurrently | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Dave Smith <smith> | ||||||
| Component: | TPTP.monitoring | Assignee: | Rohit Shetty <rohit.shetty> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P1 | CC: | apnan, jkubasta, labadie, rohit.shetty | ||||||
| Version: | unspecified | Keywords: | plan | ||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 2000 | ||||||||
| Whiteboard: | closed460 | ||||||||
| Attachments: |
|
||||||||
|
Description
Dave Smith
This was reported by a customer because they were trying to do it and getting wrong results from adapter.getStatus().getItemsProcessedCount(). Should try to address this in iteration 3. The code changes to detect if an adapter is already being run by the instance of the Adapter and issue a message cannot be contained in TPTP 4.4 release. Deferring this to a future release. However, I'll open another bugzilla to update the web documentation and add an item to the release notes for this issue. This is required from AC perspective Add a sizing which includes creating a new testcase to cover this case. Created attachment 87987 [details]
Patch for the Adapter class
This is a partial patch for this problem. It might be good to log some messages when returning if the adapter is already running.
Created attachment 88621 [details]
updated patch
Added test case for this scenario, The patch is based on my conversation with Dave: Me: I thought throwing an Adapter exception if the adapter is already running might be a good idea. Its the callers responsibility to catch this exception and do something with it .i.e. display it to the user or maybe wait until the adapter has stopped to restart it or maybe even stop the adapter and start it again. Here's the message being thrown: HyadesGAAdapter_Already_Running_ERROR_=IWATXXXXX This instance of the adapter is already active. Please ensure that you stop the adapter before trying to start it again. Ive added IWATXXXXX for now, because the Message ID Generator seems to have stopped working. Ill fix this before checking-in. Dave: Yes, throwing an exception from the start method if the adapter is already running is appropriate. It would probably be better to create a new exception class AdapterBusy that extends AdapterException so the caller can better detect that the adapter is already running. This new exception class would have to be added to the Javadoc for the start method under the @throws section. The validate method should be changed to check if the adapter is running and throw this busy exception because it may cause corruption of the running adapter. The getConfiguration method is currently checking if the adapter is running but is returning null if it is running. It should be changed to throw the busy exception as well. The javadoc for all methods that throw the new exception should be updated appropriately. The message looks fine. For the documentation, I had added a note in the GLA programming guide web document, at the bottom of the "Programming with the GLA API" section (http://www.eclipse.org/tptp/monitoring/documents/gla/tptp_44/GLA_pkg.html#2.0) to indicate that running multiple adapters at the same time with the same Adapter instance was not supported. This would have to be updated to indicate that the exception will be thrown instead of saying unpredictable behaviour will occur. Also, the method descriptions in that section should be updated with the new busy exception in the throws section similar to the javadoc changes in the code. The doc update will be handled with -> https://bugs.eclipse.org/bugs/show_bug.cgi?id=217496 As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since the originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. |