Project

General

Profile

Bug #896

MapPyGroup birth and death

Added by Jackson, Mike over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
common_py
Target version:
Start date:
07 February 2012
Due date:
% Done:

100%

Estimated time:
Workflow:
Closed

Description

A possible issue?

At present MapPyGroup.death does:

        try:
            for worker in self._workers:
                assert worker.death()
        except: # pylint:disable = W0702
            return False
        return True

This means that if death of one sub-worker fails, then death won't be called on subsequent workers? Is this an issue? Will it matter that the subsequent ones won't be @death@d and possibly do their clean-up?

#1

Updated by Tunnell, Christopher over 9 years ago

For offline user-mode, it was just meant to crash and burn so people actually noticed that death failed. If death fails then something very wrong has happened...

For online running, we want to keep running so will want to 'death' as much as possible. We could just set an 'error' bit, do try-catch, if exception then error := 1 but continue 'death'ing workers. Then the function returns not(error)? Then go can choose what to do.

But I agree that complicated logic should be avoided in MapPyGroup: it should kill all it can, then notify how well it did.

#2

Updated by Rogers, Chris over 9 years ago

  • Category changed from Online reconstruction to common_py
  • Assignee changed from Tunnell, Christopher to Rogers, Chris

I can do it if you want...

#3

Updated by Rogers, Chris over 9 years ago

Also, in del I notice that it always deaths the workers. What if I have multiple instances? Should be that we death() only if this is the last reference (i.e. death works like a normal python destructor)

#4

Updated by Rogers, Chris over 9 years ago

Forget that last comment, it's just wrong...

#5

Updated by Rogers, Chris over 9 years ago

  • Target version set to Future MAUS release
  • Workflow changed from New Issue to Awaiting Merge

Fixed in Rogers and tests added for whole class (I even found some bugs)

#6

Updated by Rogers, Chris over 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
  • Workflow changed from Awaiting Merge to Closed

I also fixed birth so that if it fails, it deaths() all workers.

#7

Updated by Rogers, Chris over 9 years ago

  • Target version changed from Future MAUS release to MAUS-v0.1.4

Also available in: Atom PDF