Ticket #6661 (closed: fixed)
Enable Live Listener to request data from the start of the run
Reported by: | Ross Miller | Owned by: | Ross Miller |
---|---|---|---|
Priority: | major | Milestone: | Release 2.6 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #6938 | Tester: | Russell Taylor |
Description
Allow the SNS Live Listener to receive data all the way back to the beginning of the run when it first connects.
Change History
comment:2 Changed 8 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: c53ffd3ff3396a80787a3fa84f4172bfc32cc4ed
comment:3 Changed 8 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:4 Changed 8 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:7 Changed 8 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 3ca82b8317c65f2c95f8de0c377a2ae0ffb69989
comment:9 Changed 8 years ago by Ross Miller
- Status changed from accepted to verify
- Resolution set to fixed
comment:10 Changed 8 years ago by Russell Taylor
- Status changed from verify to verifying
- Tester set to Russell Taylor
I'm taking this to get it out of the list and sit on it until the SMS that can handle it is deployed.
comment:11 Changed 8 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: 175ed95afab73d32dbd66893d4c04fa773afb8d5
comment:12 Changed 8 years ago by Ross Miller
GUI changes to the StartLiveData dialog
Changed the layout of the radio buttons, added "UTC" to the absolute time label and added code to limit the times the edit box will accept
Refs #6661
Changeset: 3c7ba438a239f8453a22c063a5d5adf6990189f2
comment:13 Changed 8 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d1efa7da04a0920a6b0ae601dcdc0dacb1ece22c
comment:14 Changed 8 years ago by Ross Miller
comment:15 Changed 8 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 17c1f7873da0334ca07c62cc6874e992cdad7f0a
comment:16 Changed 7 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: c53ffd3ff3396a80787a3fa84f4172bfc32cc4ed
comment:17 Changed 7 years ago by Ross Miller
GUI changes to the StartLiveData dialog
Changed the layout of the radio buttons, added "UTC" to the absolute time label and added code to limit the times the edit box will accept
Refs #6661
Changeset: 9380b3176f1cd71aa3673fead8fe7225afad5eb8
comment:18 Changed 7 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:19 Changed 7 years ago by Ross Miller
comment:20 Changed 7 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 3ca82b8317c65f2c95f8de0c377a2ae0ffb69989
comment:21 Changed 7 years ago by Russell Taylor
- Status changed from verifying to reopened
- Resolution fixed deleted
When this works, it works really nicely. However, I sometimes get a failure:
Error in execution of algorithm LoadInstrument: nthValue(): TimeSeriesProperty 's2' is empty Caught a runtime exception. Exception message: nthValue(): TimeSeriesProperty 's2' is empty Thread will exit.
What we need to do if possible is delay the loading of the instrument until the logs have been populated. We could do something around catching the exception, but that would leave some detectors in the wrong place.
comment:22 Changed 7 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: c53ffd3ff3396a80787a3fa84f4172bfc32cc4ed
comment:23 Changed 7 years ago by Ross Miller
GUI changes to the StartLiveData dialog
Changed the layout of the radio buttons, added "UTC" to the absolute time label and added code to limit the times the edit box will accept
Refs #6661
Changeset: 9380b3176f1cd71aa3673fead8fe7225afad5eb8
comment:24 Changed 7 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:25 Changed 7 years ago by Ross Miller
comment:26 Changed 7 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 3ca82b8317c65f2c95f8de0c377a2ae0ffb69989
comment:27 Changed 7 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: c53ffd3ff3396a80787a3fa84f4172bfc32cc4ed
comment:28 Changed 7 years ago by Ross Miller
GUI changes to the StartLiveData dialog
Changed the layout of the radio buttons, added "UTC" to the absolute time label and added code to limit the times the edit box will accept
Refs #6661
Changeset: 9380b3176f1cd71aa3673fead8fe7225afad5eb8
comment:29 Changed 7 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:30 Changed 7 years ago by Ross Miller
comment:31 Changed 7 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 3ca82b8317c65f2c95f8de0c377a2ae0ffb69989
comment:32 Changed 7 years ago by Ross Miller
Delay initialization of the live listener
Don't perform the final initialization steps for the live listener until the first BankedEventPacket arrives. We don't need to complete the init steps any earlier and waiting as long as possible ensures all the device decriptor and variable value packets have been processed.
Refs #6661
Changeset: fb8a1d00f7e4727a37f5b1eeda3c89d77b1ac324
comment:33 Changed 7 years ago by Ross Miller
Delay initialization of the live listener
Don't perform the final initialization steps for the live listener until the first BankedEventPacket arrives. We don't need to complete the init steps any earlier and waiting as long as possible ensures all the device decriptor and variable value packets have been processed.
Refs #6661
Changeset: fb8a1d00f7e4727a37f5b1eeda3c89d77b1ac324
comment:35 Changed 7 years ago by Ross Miller
- Status changed from accepted to verify
- Resolution set to fixed
comment:37 Changed 7 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: c53ffd3ff3396a80787a3fa84f4172bfc32cc4ed
comment:38 Changed 7 years ago by Ross Miller
GUI changes to the StartLiveData dialog
Changed the layout of the radio buttons, added "UTC" to the absolute time label and added code to limit the times the edit box will accept
Refs #6661
Changeset: 9380b3176f1cd71aa3673fead8fe7225afad5eb8
comment:39 Changed 7 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:40 Changed 7 years ago by Ross Miller
comment:41 Changed 7 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 3ca82b8317c65f2c95f8de0c377a2ae0ffb69989
comment:42 Changed 7 years ago by Ross Miller
Delay initialization of the live listener
Don't perform the final initialization steps for the live listener until the first BankedEventPacket arrives. We don't need to complete the init steps any earlier and waiting as long as possible ensures all the device decriptor and variable value packets have been processed.
Refs #6661
Changeset: fb8a1d00f7e4727a37f5b1eeda3c89d77b1ac324
comment:43 Changed 7 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: c53ffd3ff3396a80787a3fa84f4172bfc32cc4ed
comment:44 Changed 7 years ago by Ross Miller
GUI changes to the StartLiveData dialog
Changed the layout of the radio buttons, added "UTC" to the absolute time label and added code to limit the times the edit box will accept
Refs #6661
Changeset: 9380b3176f1cd71aa3673fead8fe7225afad5eb8
comment:45 Changed 7 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:46 Changed 7 years ago by Ross Miller
comment:47 Changed 7 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 3ca82b8317c65f2c95f8de0c377a2ae0ffb69989
comment:48 Changed 7 years ago by Ross Miller
Delay initialization of the live listener
Don't perform the final initialization steps for the live listener until the first BankedEventPacket arrives. We don't need to complete the init steps any earlier and waiting as long as possible ensures all the device decriptor and variable value packets have been processed.
Refs #6661
Changeset: fb8a1d00f7e4727a37f5b1eeda3c89d77b1ac324
comment:49 Changed 7 years ago by Ross Miller
Changes to allow Live Listener to replay historic data from SMS
This is just the first cut - few more minor changes are still needed.
Refs #6661
Changeset: c53ffd3ff3396a80787a3fa84f4172bfc32cc4ed
comment:50 Changed 7 years ago by Ross Miller
GUI changes to the StartLiveData dialog
Changed the layout of the radio buttons, added "UTC" to the absolute time label and added code to limit the times the edit box will accept
Refs #6661
Changeset: 9380b3176f1cd71aa3673fead8fe7225afad5eb8
comment:51 Changed 7 years ago by Ross Miller
Fix GUI problems in RHEL 6 builds
The previous GUI changes used a function that wasn't available in the version of Qt that comes with RHEL6.
Refs #6661
Changeset: d71071832da6d9caf8e230f5cd75ad7d911d0f1d
comment:52 Changed 7 years ago by Ross Miller
comment:53 Changed 7 years ago by Ross Miller
Add code to validate requested start time for live listener
Added code to LoadLiveData.cpp to validate the time string for the requested start time. Also use the epoch time for the "start from now" option (instead of using the current time). The epoch time gets converted to 0 when passed to SMSD and SMSD handles that a little more efficiently than passing it the current time.
Refs #6661
Changeset: 3ca82b8317c65f2c95f8de0c377a2ae0ffb69989
comment:54 Changed 7 years ago by Ross Miller
Delay initialization of the live listener
Don't perform the final initialization steps for the live listener until the first BankedEventPacket arrives. We don't need to complete the init steps any earlier and waiting as long as possible ensures all the device decriptor and variable value packets have been processed.
Refs #6661
Changeset: fb8a1d00f7e4727a37f5b1eeda3c89d77b1ac324
comment:56 Changed 7 years ago by Russell Taylor
This is still locking up when the Run status is 'Stopped'. Unfortunately, that's how it's been most of the day so I can't even recheck for an actual run.
comment:57 Changed 7 years ago by Russell Taylor
- Status changed from verifying to reopened
- Resolution fixed deleted
- Milestone changed from Release 2.5 to Release 2.6
We need to sort out the problem where the algorithm locks up if no BankedEvent packets are received (e.g. when outside a run). Seems like this can't be achieved in time for this release.
comment:58 Changed 7 years ago by Ross Miller
Don't initialize live listener without required log values
Parse the instrument definition XML looking for nodes named 'logfile' that are children of nodes named 'parameter'. Record the 'id' attribute for these nodes. Prior to executing the LoadInstrument algorithm, verify that we've received values for each of logs.
Refs #6661
Changeset: eb1f716487c2edf757b165e805639c1b33fd267d
comment:59 Changed 7 years ago by Ross Miller
Don't let the live listener block the main thread indefinitely
Limit the amount of time the main thread will block inside extractData() waiting for the live listener background thread to initialize.
Refs #6661
Changeset: 1de96afed0a0f1fce8a522cfaa59d01f2027c504
comment:60 Changed 7 years ago by Ross Miller
Ensure that the live listener background thread always exits
If the user canceles the live listener algorithm at just the right time, it was possible for the background thread to be stuck in a loop waiting for something from the foreground thread and thus the thread would never exit. This change adds a couple of checks to make sure the background thread won't get stuck.
Refs #6661
Changeset: 476b227e5e23b491e81e062504ea8ad43165072c
comment:61 Changed 7 years ago by Ross Miller
Don't initialize live listener without required log values
Parse the instrument definition XML looking for nodes named 'logfile' that are children of nodes named 'parameter'. Record the 'id' attribute for these nodes. Prior to executing the LoadInstrument algorithm, verify that we've received values for each of logs.
Refs #6661
Changeset: eb1f716487c2edf757b165e805639c1b33fd267d
comment:62 Changed 7 years ago by Ross Miller
Don't let the live listener block the main thread indefinitely
Limit the amount of time the main thread will block inside extractData() waiting for the live listener background thread to initialize.
Refs #6661
Changeset: 1de96afed0a0f1fce8a522cfaa59d01f2027c504
comment:63 Changed 7 years ago by Ross Miller
Ensure that the live listener background thread always exits
If the user canceles the live listener algorithm at just the right time, it was possible for the background thread to be stuck in a loop waiting for something from the foreground thread and thus the thread would never exit. This change adds a couple of checks to make sure the background thread won't get stuck.
Refs #6661
Changeset: 476b227e5e23b491e81e062504ea8ad43165072c
comment:65 Changed 7 years ago by Ross Miller
- Status changed from accepted to verify
- Resolution set to fixed
comment:67 Changed 7 years ago by Russell Taylor
- Status changed from verifying to reopened
- Resolution fixed deleted
Choosing 'Start of Run' while the instrument is taking data leads to the following:
SNSLiveEventDataListener-[Fatal] Caught an invalid packet exception in SNSLiveEventDataListener network read thread. SNSLiveEventDataListener-[Fatal] Exception message is: VariableValue (double) packet has invalid status: 65534 SNSLiveEventDataListener-[Fatal] Thread is exiting.
Choosing to start from 'Now' is OK.
comment:68 Changed 7 years ago by Russell Taylor
Hmmm - that one seems to have gone away now. Could it have been a function of being deep into a run?
However, I've now been seeing initialization timeouts when (I think) they're outside a run.
comment:69 Changed 7 years ago by Andrei Savici
Merge branch 'feature/6823_DakotaChiSquared_output' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:70 Changed 7 years ago by Ross Miller
Merge branch 'feature/6661_LiveListenerDataStart' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:71 Changed 7 years ago by Stuart Campbell
Merge branch 'feature/7021_cmake_linux_distro' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:72 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/6516_sans_reduction_apiv2' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:73 Changed 7 years ago by Andrei Savici
Merge branch 'feature/6823_DakotaChiSquared_output' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:74 Changed 7 years ago by Ross Miller
Merge branch 'feature/6661_LiveListenerDataStart' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:75 Changed 7 years ago by Stuart Campbell
Merge branch 'feature/7021_cmake_linux_distro' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:76 Changed 7 years ago by Mathieu Doucet
Merge branch 'feature/6516_sans_reduction_apiv2' into develop into 6856_ConvertToDiffractionMDWS_v2
comment:77 Changed 7 years ago by Ross Miller
More cleanups to the Live Listener init process
Added checks to see if we could complete the init process to several of the rxPacket() functions. Also, if the user requests data from the start of the current run and we're not actually in a run, we'll throw an exception with an appropriate error message.
Refs #6661
Changeset: 1c591d1d8e688d5af916e9bb1d5128634743475e
comment:78 Changed 7 years ago by Ross Miller
Merge branch 'feature/6661_LiveListenerDataStart' into develop
comment:80 Changed 7 years ago by Ross Miller
- Status changed from accepted to verify
- Resolution set to fixed
comment:82 Changed 7 years ago by Russell Taylor
- Status changed from verifying to reopened
- Resolution fixed deleted
The out of run behaviour is not quite what we want. It gives the following:
StartLiveData-[Notice] StartLiveData started SNSLiveEventDataListener-[Fatal] Caught a runtime exception. SNSLiveEventDataListener-[Fatal] Exception message: User requested data from start of current run, but system is not currently in a run. SNSLiveEventDataListener-[Fatal] Thread will exit. LoadLiveData-[Notice] Performing the Replace operation. MonitorLiveData-[Notice] MonitorLiveData started StartLiveData-[Notice] StartLiveData successful, Duration 0.11 seconds MonitorLiveData-[Notice] Loading live data chunk 0 at 14:35:19 MonitorLiveData-[Error] Error in execution of algorithm MonitorLiveData: MonitorLiveData-[Error] User requested data from start of current run, but system is not currently in a run.
It also hands back an empty (1 spectrum) workspace. We want the exception to come out the first time extractData() is called so that StartLiveData fails rather than apparently succeeding. We don't want to end up with a workspace.
comment:84 Changed 7 years ago by Ross Miller
Don't set m_workspaceInitialized to true in exception handlers
Originally did this to prevent us from blocking indefinitely waiting for an initialization that would never happen, but that code has since changed and modifying m_workspaceInitialized is no longer desirable
Refs #6661
Changeset: a41c2e6e526282befeda84530dab2f72debf7361
comment:85 Changed 7 years ago by Ross Miller
Merge branch 'feature/6661_LiveListenerDataStart' into develop
comment:86 Changed 7 years ago by Ross Miller
- Status changed from accepted to verify
- Resolution set to fixed
comment:88 Changed 7 years ago by Russell Taylor
- Status changed from verifying to closed
Works perfectly when in a run and exhibits the behaviour we decided upon when outside a run - which is to just fail the algorithm. Given that we fell back to this 'simple' behaviour, I wonder whether all of the complexity in the SNSLiveEventDataListener (e.g. XML parsing) is really necessary - the class is pretty complex as it is and its length has increased by ~30% under this ticket.
comment:90 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7507
Development branch is "feature/6661_LiveListenerDataStart"