Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread safe StorageAccounting #10932

Merged
merged 16 commits into from
Sep 20, 2015

Conversation

Dr15Jones
Copy link
Contributor

Changed StorageAccounting so that all methods are thread-safe.
Also changed the iterface to avoid multiple lookups via strings.

As a step towards thread safety, LocalFileSystem is not immutable. The caching of any error messages caused by calling findCachePath is now retained within StorageFactory.
There were a number of functions which were marked virtual but which were not overriding methods of the base class. Given there are no classes which inherit from RFIOFile, these functions are now non-virtual and the class has been marked final. Added override to the appropriate places.
Switched to using smart pointers instead of bare pointers and converted appropriate functions to be const. Also provided a way to request only the const version of StorageFactory in order to better understand the threading issues.
The timeouts will now automatically happen if the StorageFactory was configured to use a timeout. The timeouts were never by file but always by protocol before so there should be no noticeable difference.
Changed the StorageMaker interface to allow them to be state-less which allows all methods to be const. Changed all classes inheriting from StorageMaker to make them thread-safe.
The output of this method was not being used.
The use of a boost::shared_ptr is unnecessary in this code since if there is an entry in the parent map the shared_ptr was always set.
Want to allow lock free read/write to the Counters. Reading the values while the program is running will lead to inconsistent values although for monitoring purposes this shouldn't be a problem.
Switched to the thread-safe tbb::concurrent_unordered_map container.
Instead of allowing each storage type to define its own set of strings for operations, we now use a preset list.
Previously the code just used strings to identify the different storage classes. This meant the need for lots of string comparisons. The code now uses StorageClassToken which is obtained using the original string name.
@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_6_X.

Thread safe StorageAccounting

It involves the following packages:

FWCore/Services
IOPool/Input
IOPool/Streamer
IOPool/TFileAdaptor
Utilities/DCacheAdaptor
Utilities/LStoreAdaptor
Utilities/RFIOAdaptor
Utilities/StorageFactory
Utilities/XrdAdaptor

@cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @wddgit, @wmtan this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@Dr15Jones
Copy link
Contributor Author

please test

@Dr15Jones
Copy link
Contributor Author

@bbockelm

@Dr15Jones
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

Pull request #10932 was updated. @vciulli, @smuzaffar, @diguida, @covarell, @thuer, @cmsbuild, @Dr15Jones, @cerminar, @bendavid, @mmusich can you please check and sign again.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@Dr15Jones
Copy link
Contributor Author

+1

@Dr15Jones
Copy link
Contributor Author

@smuzaffar @davidlange6 why does the github label say this needs approval by alca and generators?

@smuzaffar
Copy link
Contributor

@Dr15Jones , due to changes in following packages
generator: GeneratorInterface/LHEInterface
alca: IORawData/SiPixelInputSources/

@Dr15Jones
Copy link
Contributor Author

Please sign @bendavid @covarell @diguida @mmusich

@Dr15Jones
Copy link
Contributor Author

Ping @bendavid @covarell @diguida @mmusich It has been 22 days since I submitted this.
@davidlange6

@diguida
Copy link
Contributor

diguida commented Sep 15, 2015

+1
minimal changes for AlCa in IORawData/SiPixelInputSources/src/PixelSLinkDataInputSource.cc
@Dr15Jones sorry: I was confused by the bot.

davidlange6 added a commit that referenced this pull request Sep 20, 2015
@davidlange6 davidlange6 merged commit 3abedb2 into cms-sw:CMSSW_7_6_X Sep 20, 2015
@Dr15Jones Dr15Jones deleted the threadSafeStorageAccounting branch October 19, 2015 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants