I would vote for moving the call to assignBucketsToPartitions outside your no
lock code.
I think you just want to hold the lock while reading and modifying prConfig.
assignBucketsToPartitions gets its own lock (the recovery lock) and I don't see
a logical reason why you would want to do it while locked.
Consider refactoring the lock, unlock, the get of the preconfig and the
updatePRConfig calls into a single method that takes an interface that modifies
a pr config: "interface PartitionRegionConfigModifier {void
modify(PartitionRegionConfig)". You could then call that method in both of
these with just a lambda that does the actual change of the prconfig.
[ Full content available at: https://github.com/apache/geode/pull/3308 ]
This message was relayed via gitbox.apache.org for
[email protected]