Ticket #4902 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Make sure DataService is thread-safe, and add a unit test

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.1
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: #4787 Tester: Stuart Campbell

Description (last modified by Janik Zikovsky) (diff)

DataService class was not unit tested directly (some tests in AnalysisDataService).

Mostly, though, I need to make sure that the AnalysisDataService is thread-safe, especially when it comes to notifications. If a few threads are simultaneously modifying the ADS, then the GUI might get parallel notifications to update components. E.g. multiple MonitorLiveData instances.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Janik Zikovsky

  • Description modified (diff)

comment:3 Changed 9 years ago by Janik Zikovsky

Refs #4902: DataService: add test and make thread safe

Changeset: cb20c59f5d0b1b97774545f39bb83661773fd463

comment:4 Changed 9 years ago by Janik Zikovsky

Refs #4902 add headers for MemoryManager

Because I took it out of DataService.h, where it could not legally sit since MemoryManager is API and DataService is Kernel

Changeset: 9760752902d316b0448b3356dbe6232bb481776c

comment:5 Changed 9 years ago by Janik Zikovsky

Test for WorkspaceGroup. Added mutex in DataService for thread safety

Refs #4903, Refs #4902

Changeset: 3e8dd88dd3c351037fae1b960380cb93a2d9883f

comment:6 Changed 9 years ago by Russell Taylor

Fix test build on Linux & Mac. Re #4902.

Changeset: b65958c082cec0554fbaef8fa784eec6d7850a5f

comment:7 Changed 9 years ago by Janik Zikovsky

  • Status changed from accepted to verify
  • Resolution set to fixed

Note to testers: I have a unit test, and I tried multiple instances of MonitorLiveData all updating the same workspace at the same time very quickly. I had to get to ~10 instances running at ~20/second (each) before getting a segfault which may or may not have been in the ADS...

comment:8 Changed 8 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:9 Changed 8 years ago by Stuart Campbell

  • Status changed from verifying to verify
  • Tester Wenduo Zhou deleted

comment:10 Changed 8 years ago by Stuart Campbell

  • Status changed from verify to verifying
  • Tester set to Stuart Campbell

comment:11 Changed 8 years ago by Stuart Campbell

I can only get 8 instances running (updating every 0.01 sec) ... looks ok.

Only issue is that when I try and start a 9th instance I get a scary unexpected exception dialog saying that "No thread available"... I will create a ticket to make this less scary!

comment:12 Changed 8 years ago by Stuart Campbell

  • Status changed from verifying to closed

Ticket #5230 created.

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5748

Note: See TracTickets for help on using tickets.