Commit Graph

19 Commits

Author SHA1 Message Date
David Anderson 846b8c7757 all components: change strcpy() to strlcpy() when possible.
This commit should cover the client and manager code.
2013-06-03 20:24:48 -07:00
David Anderson ab120dea9e - web: after post to a thread, show thread in user's chosen order
instead of newest first.


svn path=/trunk/boinc/; revision=25931
2012-08-01 17:57:56 +00:00
David Anderson c703b68090 - server: allow <db_host> to include a :port
svn path=/trunk/boinc/; revision=25405
2012-03-12 21:45:29 +00:00
David Anderson 24d386e511 - db_purge: when deleting a workunit record,
delete any assignments that refer to it


svn path=/trunk/boinc/; revision=25284
2012-02-17 18:26:36 +00:00
David Anderson 7c201eba3f - DB: use %u when writing result IDs in SQL queries;
this is to support SETI@home, which ran out of result IDs
    and changed the DB field type to int unsigned.
    Note: eventually I'll make this change official
    and change the .h types as well.
- web: put <apps_selected> tags around <app_id> elements
    in project-specific prefs.


svn path=/trunk/boinc/; revision=24555
2011-11-09 07:41:49 +00:00
David Anderson ae04b50a71 - client: don't crash if trickle up exceeds 64KB
(this bug was introduced Sept 20)
- scheduler: truncate long trickle-ups to 256KB; don't crash


svn path=/trunk/boinc/; revision=24535
2011-11-06 06:25:48 +00:00
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
David Anderson 3410abef6f - backend API: added function cancel_jobs(minid, maxid)
for canceling jobs
- added program cancel_jobs for canceling jobs
- DB interface: it's not an error if update_fields_noid()
    affects != 1 rows


svn path=/trunk/boinc/; revision=24413
2011-10-18 07:15:04 +00:00
David Anderson e276aa5ed6 - server: make the -d 4 feature work with FCGI
svn path=/trunk/boinc/; revision=21109
2010-04-05 23:12:02 +00:00
David Anderson a5c2f98481 - backend: make "print queries" a runtime instead of compile-time
decision (bool g_print_queries)


svn path=/trunk/boinc/; revision=21065
2010-04-03 00:02:38 +00:00
David Anderson 2335e009bb svn path=/trunk/boinc/; revision=21022 2010-03-29 22:29:21 +00:00
David Anderson fb851311e0 - server: various changes;
see http://boinc.berkeley.edu/trac/wiki/CreditNew

    Projects will need to update DB and recompile all back-end programs.

    Summary:
    - new way of computing credit
    - "reliable host" mechanism is per app version
    - "host punishment" mechanism is per app version
    - adjustment of wu.rsc_fpops_est provides the
        equivalent of per app version DCF
    - max jobs in progress is now per app
    - max jobs per RPC is now per app

    TODO:
    - reliable mechanism:
        - populate and use host_app_version.error_rate
        - populate host_app_version.turnaround
    - host punishment:
        - populate host_app_version.max_jobs_per_day
        - populate host_app_version.n_jobs_today
        - use app.max_jobs_per_day_init
    - job limits:
        - use app.max_jobs_in_progress, max_gpu_jobs_in_progress
        - use app.max_jobs_per_rpc
    - adjust wu.rsc_fpops_est
    - remove old credit stuff
        fpops_cumulative, credit_multiplier
        credit computation in scheduler

- AVERAGE class: use the Knuth algorithm (Wikipedia)


svn path=/trunk/boinc/; revision=21021
2010-03-29 22:28:20 +00:00
David Anderson 85d0027d3b - server: DB update queries check that the number of affected rows is 1.
However, MySQL's default is that "affected rows" is
    rows actually modified, which is not what we want.
    Use the CLIENT_FOUND_ROWS option in mysql_real_connect()
    to change the semantics to "rows matched".
    From Oliver Bock.

svn path=/trunk/boinc/; revision=20880
2010-03-12 19:36:20 +00:00
David Anderson 9020d0b715 - server: if MySQL version is 5.0.19 <= v < 5.1,
set the reconnect option before real_connect() instead of after.
    From Oliver Bock.

svn path=/trunk/boinc/; revision=20763
2010-03-01 19:12:19 +00:00
David Anderson 10f9e11ee6 - lib: created a new file for declaring "replacements"
for functions like strlcpy() etc.
    config.h is included here rather than in str_util.h


svn path=/trunk/boinc/; revision=18437
2009-06-16 20:54:44 +00:00
David Anderson 323fdc0e21 - DB code: fixed three places where we accessed a MYSQL_ROW
after freeing the MYSQL_RES it came from.
    (this didn't appear to cause any problems, but not good form).
    Fixes #883

svn path=/trunk/boinc/; revision=17904
2009-04-28 19:20:23 +00:00
David Anderson b5cece0928 - back-end programs: set MySQL option to reconnect to server
if the connection goes away
    (which it apparently does if idle for a while)

svn path=/trunk/boinc/; revision=16532
2008-11-19 00:16:07 +00:00
David Anderson 59184caaa9 - scheduler: FCGI: use mysql_ping() to check that DB connection
is still alive before handling a request.  If not, try to reconnect.
    This will hopefully make things work better if MySQL goes down and up
    when using FCGI.

svn path=/trunk/boinc/; revision=16112
2008-10-02 19:03:52 +00:00
David Anderson 98cfb8d3b0 - rename .C files to .cpp so that Doxygen will work
svn path=/trunk/boinc/; revision=16069
2008-09-26 18:20:24 +00:00