Changes between Version 4 and Version 5 of BackendState


Ignore:
Timestamp:
Jul 21, 2007, 12:22:25 PM (17 years ago)
Author:
Nicolas
Comment:

Consistency on capital letter, full stop, spaces around symbols, etc.

Legend:

Unmodified
Added
Removed
Modified
  • BackendState

    v4 v5  
    1010=== `canonical_resultid` === #wu_canonical_resultid
    1111The ID of the canonical result for this workunit, or zero.
    12  * Initially zero
    13  * Set by the validator (by `check_set()`)
     12 * Initially zero.
     13 * Set by the validator (by `check_set()`).
    1414
    1515=== `transition_time` === #wu_transition_time
     
    1717 * Initially now.
    1818 * Set to now by scheduler when get a result for this WU.
    19  * Set to min(current value, now + delay_bound) by scheduler when send a result for this WU
    20  * Set to min(x.sent_time + wu.delay_bound) over IN_PROGRESS results x by transitioner when done handling this WU
    21  * Set to now by validator if it finds canonical result, or if there is already a canonical result and some other results have validate_state = INIT, or if there is no consensus and the number of successful results is > wu.max_success_results
     19 * Set to min(current value, now + delay_bound) by scheduler when send a result for this WU.
     20 * Set to min(x.sent_time + wu.delay_bound) over IN_PROGRESS results x by transitioner when done handling this WU.
     21 * Set to now by validator if it finds canonical result, or if there is already a canonical result and some other results have validate_state = INIT, or if there is no consensus and the number of successful results is > wu.max_success_results.
    2222
    2323=== `file_delete_state` === #wu_file_delete_state
    2424Indicates whether input files should be deleted.
    25  * Initially INIT
    26  * Set to READY by transitioner when all results have server_state=OVER and wu.assimilate_state=DONE Note: db_purge purges a WU and all its results when file_delete_state=DONE; therefore it is critical that it only be set to DONE if all results have server_state=OVER.
     25 * Initially INIT.
     26 * Set to READY by transitioner when all results have server_state = OVER and wu.assimilate_state = DONE. '''Note:''' db_purge purges a WU and all its results when file_delete_state = DONE; therefore it is critical that it only be set to DONE if all results have server_state = OVER.
    2727 * Set to DONE by file_deleter when it has attempted to delete files.
    2828
    2929=== `assimilate_state` === #wu_assimilate_state
    3030Indicates whether the workunit should be assimilated.
    31  * Initially INIT
    32  * Set to READY by transitioner if wu.assimilate_state=INIT and WU has error condition
    33  * Set to READY by validator when find canonical result and wu.assimilate_state=INIT
    34  * Set to DONE by assimilator when done
     31 * Initially INIT.
     32 * Set to READY by transitioner if wu.assimilate_state = INIT and WU has error condition.
     33 * Set to READY by validator when find canonical result and wu.assimilate_state = INIT.
     34 * Set to DONE by assimilator when done.
    3535
    3636=== `need_validate` === #wu_need_validate
    3737Indicates that the workunit has a result that needs validation.
    38  * Initially FALSE
    39  * Set to TRUE by transitioner if the number of success results is at least wu.min_quorum and there is a success result not validated yet
    40  * Set to FALSE by validator
     38 * Initially FALSE.
     39 * Set to TRUE by transitioner if the number of success results is at least wu.min_quorum and there is a success result not validated yet.
     40 * Set to FALSE by validator.
    4141
    4242=== `error_mask` === #wu_error_mask
    4343A bit mask for error conditions.
    44  * Initially zero
     44 * Initially zero.
    4545 * Transitioner sets COULDNT_SEND_RESULT if some result couldn't be sent.
    46  * Transitioner sets TOO_MANY_RESULTS if too many error results
    47  * Transitioner sets TOO_MANY_TOTAL_RESULTS if too many total results
    48  * Validator sets TOO_MANY_SUCCESS_RESULTS if no consensus and too many success results
     46 * Transitioner sets TOO_MANY_RESULTS if too many error results.
     47 * Transitioner sets TOO_MANY_TOTAL_RESULTS if too many total results.
     48 * Validator sets TOO_MANY_SUCCESS_RESULTS if no consensus and too many success results.
    4949
    5050=== Workunit invariants === #wu_invariants
    5151
    52  * eventually either canonical_resultid or error_mask is set
    53  * eventually transition_time = infinity
    54  * Each WU is assimilated exactly once
     52 * Eventually either canonical_resultid or error_mask is set.
     53 * Eventually transition_time = infinity.
     54 * Each WU is assimilated exactly once.
    5555
    5656=== Notes on deletion of input files === #wu_deletion_notes
    5757
    58  * Input files are eventually deleted, but only when all results have state=OVER (so that clients don't get download failures) and the WU has been assimilated (in case the project wants to examine input files in error cases).
     58 * Input files are eventually deleted, but only when all results have state = OVER (so that clients don't get download failures) and the WU has been assimilated (in case the project wants to examine input files in error cases).
    5959
    6060
     
    6363=== `report_deadline` === #result_report_deadline
    6464Give up on result (and possibly delete input files) if don't get reply by this time.
    65  * Set by scheduler to now + wu.delay_bound when send result
     65 * Set by scheduler to now + wu.delay_bound when send result.
    6666
    6767=== `server_state` === #result_server_state
    6868Values: UNSENT, IN_PROGRESS, OVER
    69  * Initially UNSENT
    70  * Set by scheduler to IN_PROGRESS when send result
     69 * Initially UNSENT.
     70 * Set by scheduler to IN_PROGRESS when send result.
    7171 * Set by scheduler to OVER when result is reported in request message from client.
    7272 * Set by scheduler to OVER when it thinks host has detached project.
    73  * Set by transitioner to OVER if now > result.report_deadline
    74  * Set by transitioner to OVER if WU has error condition and result.server_state=UNSENT
    75  * Set by validator to OVER if WU has canonical result and result.server_state=UNSENT
     73 * Set by transitioner to OVER if now > result.report_deadline.
     74 * Set by transitioner to OVER if WU has error condition and result.server_state = UNSENT.
     75 * Set by validator to OVER if WU has canonical result and result.server_state = UNSENT.
    7676
    7777=== `outcome` === #result_outcome
    78 Values: SUCCESS, COULDNT_SEND, CLIENT_ERROR, NO_REPLY, DIDNT_NEED, VALIDATE_ERROR, CLIENT_DETACHED. Defined iff result.server_state=OVER
    79  * Set by scheduler to SUCCESS if get reply and no client error
    80  * Set by scheduler to CLIENT_ERROR if get reply and client error
     78Values: SUCCESS, COULDNT_SEND, CLIENT_ERROR, NO_REPLY, DIDNT_NEED, VALIDATE_ERROR, CLIENT_DETACHED. Defined iff result.server_state = OVER
     79 * Set by scheduler to SUCCESS if get reply and no client error.
     80 * Set by scheduler to CLIENT_ERROR if get reply and client error.
    8181 * Set by scheduler to NO_REPLY if it thinks host has detached project.
    82  * Set by transitioner to NO_REPLY if server_state=IN_PROGRESS and now < report_deadline
    83  * Set by transitioner to DIDNT_NEED if WU has error condition and result.server_state=UNSENT
    84  * Set by validator to DIDNT_NEED if WU has canonical result and result.server_state=UNSENT
     82 * Set by transitioner to NO_REPLY if server_state = IN_PROGRESS and now < report_deadline.
     83 * Set by transitioner to DIDNT_NEED if WU has error condition and result.server_state = UNSENT.
     84 * Set by validator to DIDNT_NEED if WU has canonical result and result.server_state = UNSENT.
    8585 * Set by validator to VALIDATE_ERROR if outcome was initially SUCCESS, but the validator had a permanent error reading a result file, or a file had a syntax error. Prevents the validator from trying again.
    86  * Set by scheduler to CLIENT_DETACHED if it gets a request indicating that the client detached, then reattached
     86 * Set by scheduler to CLIENT_DETACHED if it gets a request indicating that the client detached, then reattached.
    8787
    8888=== `client_state` === #result_client_state
     
    9090
    9191=== `file_delete_state` === #result_file_delete_state
    92  * Initially INIT
    93  * Set by transitioner to READY if this is the canonical result, and file_delete_state=INIT, and wu.assimilate_state=DONE, and all the results have server_state=OVER, and all all the results with outcome=SUCCESS have validate_state<>INIT
    94  * Set by transitioner to READY if wu.assimilate_state=DONE and result.outcome=CLIENT_ERROR or result.validate_state!=INIT
     92 * Initially INIT.
     93 * Set by transitioner to READY if this is the canonical result, and file_delete_state = INIT, and wu.assimilate_state = DONE, and all the results have server_state = OVER, and all all the results with outcome = SUCCESS have validate_state <> INIT.
     94 * Set by transitioner to READY if wu.assimilate_state = DONE and result.outcome = CLIENT_ERROR or result.validate_state != INIT.
    9595
    9696=== `validate_state` === #result_validate_state
    97 Defined iff result.outcome=SUCCESS
    98  * Initially INIT
    99  * Set by validator to VALID if outcome=SUCCESS and matches canonical result
    100  * Set by validator to INVALID if outcome=SUCCESS and doesn't match canonical result
     97Defined iff result.outcome = SUCCESS
     98 * Initially INIT.
     99 * Set by validator to VALID if outcome = SUCCESS and matches canonical result.
     100 * Set by validator to INVALID if outcome = SUCCESS and doesn't match canonical result.
    101101 * Set by transitioner to NO_CHECK if the WU had an error; this avoids showing claimed credit as 'pending'.
    102  * Set by validator to ERROR if outcome=SUCCESS and had a permanent error trying to read an output file, or an output file had a syntax error.
     102 * Set by validator to ERROR if outcome = SUCCESS and had a permanent error trying to read an output file, or an output file had a syntax error.
    103103 * Set by validator to INCONCLUSIVE if check_set() didn't find a consensus in a set of results containing this one.
    104104 * Set by scheduler to TOO_LATE if the result was reported after the canonical result's files were deleted.
     
    111111=== Notes on deletion of output files === #result_deletion_notes
    112112 * Non-canonical results can be deleted as soon as the WU is assimilated.
    113  * Canonical results can be deleted only when all results have [#result_server_state server_state]=OVER and all success results are validated.
     113 * Canonical results can be deleted only when all results have [#result_server_state server_state] = OVER and all success results are validated.
    114114 * If a result reply arrives after its timeout, the output files can be immediately deleted.
    115115