Revision 7205
Added by ben leinfelder over 12 years ago
src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java | ||
---|---|---|
229 | 229 |
|
230 | 230 |
// make sure we have all metadata locally |
231 | 231 |
try { |
232 |
// pause to make us not own any keys |
|
233 |
hzInstance.getLifecycleService().pause(); |
|
232 | 234 |
// synch on restart |
233 | 235 |
resynchInThread(); |
234 | 236 |
} catch (Exception e) { |
... | ... | |
517 | 519 |
public void run() { |
518 | 520 |
try { |
519 | 521 |
resynch(); |
522 |
// now we can take ownership of keys |
|
523 |
hzInstance.getLifecycleService().resume(); |
|
520 | 524 |
} catch (Exception e) { |
521 | 525 |
logMetacat.error("Error in resynchInThread: " + e.getMessage(), e); |
522 | 526 |
} |
Also available in: Unified diff
experiment with lifecycle pause/resume. hopefully it prevents our node from taking ownership of any keys before we are sure we have them all.