boinc/db
David Anderson 4b826b52a0 - scheduler: fix bug in the "homogeneous app version" (HAV) feature
(reported by Kevin Reed).
    The problem: cache inconsistency.
    If there are 2 results for the same WU in shared mem,
    and 2 scheduler instances get them around the same time,
    they can send them with different app versions.
    We already fixed this problem for HR by
    1) rereading the relevant WU fields while deciding
        whether to send the result
    2) doing a "careful update" of the WU field using a where clause
        to make sure it wasn't modified in the (short) interval
        since rereading it.
    I fixed the HAV problem in the same way,
    and merged the two mechanisms to combine the DB queries.

    Also:
    - The rereads are done in slow_check() (see below).
    - The careful updates are done in update_wu_on_send(),
        and this is called *before* doing careful updates on result fields.
        That way, if the WU updates fail, we don't have orphaned results.
    - already_sent_to_different_platform_careful() (sic)
        no longer does DB stuff, so it's merged with
        already_send_to_different_hr_class() (better name)

    NOTE: slow_check() is used in array scheduling only.
        Score-based scheduling uses other code,
        in which this bug is not yet fixed.
        Locality scheduling doesn't support HR or HAV at all.
        This should be unified.


svn path=/trunk/boinc/; revision=24484
2011-10-26 07:15:22 +00:00
..
Makefile.am Added include of Makefile.incl and "if INSTALL_HEADERS" around 2009-03-09 15:38:21 +00:00
boinc_db.cpp - Updates Linux notifications to use current libnotify. 2011-09-27 19:45:27 +00:00
boinc_db.h - Validator: allow project-specific code to mark a result 2011-09-16 16:43:15 +00:00
bolt_constraints.sql - manager: fix unix build (new file) 2008-01-31 23:43:37 +00:00
bolt_schema.sql Bolt stuff 2008-10-30 22:58:33 +00:00
bossa_constraints.sql - scheduler: in matchmaker scheduler, if find a "locked" array slot, 2008-07-18 20:59:59 +00:00
bossa_schema.sql - lib: fix typo 2008-08-20 16:49:37 +00:00
constraints.sql - server: various changes; 2010-03-29 22:28:20 +00:00
db_base.cpp - scheduler: fix bug in the "homogeneous app version" (HAV) feature 2011-10-26 07:15:22 +00:00
db_base.h - scheduler: fix bug in the "homogeneous app version" (HAV) feature 2011-10-26 07:15:22 +00:00
init_db updated schema. combined schema into schema.sql 2003-07-24 00:30:47 +00:00
schema.sql - fix typo in DB schema 2011-09-22 03:15:21 +00:00
schema_locality.sql - GUI RPC: more replacement of std::string 2010-03-13 04:40:37 +00:00