Commit Graph

107 Commits

Author SHA1 Message Date
Vitalii Koshura 92a9b34e9c
[linux] Move all fcgi dependent stdio functions to the separate 'boinc_stdio.h' header only file
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2023-02-12 19:50:22 +01:00
Roman Trunov b3fb4c1134 transitioner: Fix race condition with file_upload_handler 2020-04-15 09:35:31 +03:00
Christian Beer c68d906ac7 Server: initialize struct members
found by Coverity (CIDs 27931 27957 278928)
2019-05-29 20:50:25 +02:00
lfield fe8f0c51fe Added option to purge retired batches 2019-05-15 15:52:40 +02:00
Vitalii Koshura 1ce3793c76
Remove unused BOINC_RCSID constants
This fixes #2953

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2019-01-12 23:43:48 +02:00
Shawn Kwang b44a8c8455 db: Renamed database field 'protect' to 'project_specific' 2018-09-17 12:55:55 -05:00
Shawn Kwang d924bb2eee db: Add necessary DB_CONSENT_TYPE declarations to boinc_db 2018-09-07 11:44:54 -05:00
Shawn Kwang 59697b7929 db: Renamed database field 'protectedct' to 'protect'. 2018-08-31 13:58:28 -05:00
Shawn Kwang 06ba429ca4 db: Add consent_type table to C++ database API. 2018-08-28 13:24:20 -05:00
Kevin Reed 239af2d508 Merge branch 'master' into knr_right_to_erase
Conflicts:
	html/ops/db_update.php
2018-05-15 13:09:11 -05:00
Keith Uplinger 12a3933d76 Updated boinc_db.cpp to print email address change columns. 2018-05-14 19:09:00 -05:00
Kevin Reed fd25c43ca4 server: change create_time on host_deleted and user_deleted to double
from int
2018-05-08 14:43:16 -05:00
Kevin Reed f868227915 web/server: change primary key of user_deleted to userid and
host_deleted to hostid
2018-05-07 11:17:45 -05:00
Kevin Reed ae17dfb09e server: add user_deleted and host_deleted output files for db_dump.
Also modify db_dump to exclude user records whose authenticator starts
with 'deleted' or host domain names that equal 'deleted'.  Those values
are set by the obfuscate delete method.
2018-05-03 15:31:42 -05:00
David Anderson d1673179d5
Merge pull request #2200 from progger/fix_insert_host
Fixed insert into host
2017-11-06 22:28:51 -08:00
David Anderson 328e53d677 Store login tokens in user records instead of separate table 2017-11-02 23:11:55 -07:00
Michael Kulabuhov 196a96585a Fixed insert into host 2017-10-30 12:47:04 +07:00
David Anderson d1561a7402 Merge pull request #1638 from BOINC/fix_c++11_build
Fix c++11 build
2017-08-14 16:56:02 -07:00
David Anderson 1be1447ce0 back end: add feature for assigning WUs to a particular version num 2017-08-09 11:56:12 -07:00
David Anderson 20d07be2b8 back end: add keyword-based component to job scheduling score.
- add DB field for storing job keywords: workunit.keywords
    add this to various DB parse/write functions
- add --keywords option to create_work for specifying job keywords
- add <keyword_sched> option in config.xml for enabling keyword score
    (it's disabled by default).
    If set, increment score for "yes" keyword matches,
    and disallow jobs with "no" matches
- in scheduler, add array job_keywords_array for parsed versions
    of job keywords (vector<int>)

also:
- use symbols instead of numbers for slow_check() return values
- parse unused fields in req message to remove unparsed-XML warnings
2017-07-22 00:48:38 -07:00
David Anderson 90f8a1d4b4 client/scheduler/db: store GPU count and peak FLOPS in DB host table
This lets a project easily see how many GPUs and how much GPU power it has
2017-06-13 22:35:17 -07:00
Christian Beer b065526b7e Validator: add res.workunitid so it can be used in the custom handler 2016-09-15 13:42:17 +02:00
David Anderson da58a333d2 remove dependence of boinc_api.h on str_replace.h
- move strcpy2() from db_base.h to boinc_db.cpp
- don't include str_replace.h from common_defs.h
- move safe_strcpy from str_replace.h to str_util.h
2016-09-02 21:12:09 -07:00
Christian Beer 5650ac8989 Lib/Sched: remove superfluous ';'
Those extra ';' produce warnings when using the "-std=gnu++11 -pedantic" flags because they are not conform with the C++11 standard.
2016-09-01 16:40:31 +02:00
David Anderson 819283fe06 server: fix bug affecting tables with > 32 bit IDs
Some of the DB functions (e.g. update()) weren't handling 32 bit IDs
2015-08-13 14:05:53 -07:00
David Anderson a87d039f49 server: more 64-bit ID fixes
negative values are stored in app_version_id fields to represent
anonymous platform versions.
So need to use %ld rather than %lu for these fields.

Also there were a couple of more changes of int do DB_ID_TYPE
2015-07-29 17:32:57 -07:00
David Anderson 8cd8c8e7ee server software: handle 64-bit database IDs
The SETI@home result table is about to run out of 32-bit IDs,
so we need to move to 64-bit result IDs.
This will happen to the workunit table at some point too.

I changed the server C++ code to use the "long" type for all DB IDs
(and to use appropriate conversion codes like %lu).
"long" is 64 bit on 64-bit machines.
For uniformity I did this for all tables,
even ones (like app) that will never get big.

I chose NOT to change the DB schema for now.
The new code will work with 32-bit ID fields in the DB.
As projects approach the 32-bit limit on a table they can change
its ID field, and fields that reference this table, to BIGINT.
This is likely to happen only on the result and workunit tables.
I put functions in html/ops/db_update.php
to change the IDs of these tables.
2015-07-23 10:11:08 -07:00
David Anderson bc9747789e size_regulator: make the DB access more efficient
The query to get counts of unsent results for various size classes
did a sequential scan, which isn't practical for large projects.
All we care about is the count up to a certain (low) limit,
so I replaced it with an enumeration with a limit, and count the results.
2015-06-03 00:30:18 -07:00
David Anderson 5ad43a6509 validator: add --wu_id N option for debugging single WU 2015-04-03 20:00:13 -07:00
David Anderson fdebbf9dd4 transitioner: debug --wu_id option 2015-03-20 14:49:31 -07:00
David Anderson d81f7ae67b transitioner: add --wu_id option so you can debug a particular WU 2015-03-17 23:39:19 -07:00
David Anderson dbd2d03a0d server/web: add support for per-application credit
See http://boinc.berkeley.edu/trac/wiki/PerAppCredit
If enabled (by the <credit_by_app> config flag)
validators will maintain on a per-(app, user, credit type) basis,
and same for teams,
in new DB tables credit_user and credit_team.
This info is displayed in the web site, on user and team pages,
using project-supplied functions to generate the HTML.

Note: update_stats doesn't decay the recent-average values
for per-app credit; I'll add this if needed.
2014-08-15 14:01:32 -07:00
David Anderson f02c349800 server: add "beta" flag to app versions
Add beta flag to app version table.
If set, send that app version only to users whose prefs allow beta work.
2014-06-05 09:51:01 -07:00
Bernd Machenschalk 34c823a9ab Merge branch 'EinsteinAtHome' into 'master'
This is meant not to break anything, just add some
(optional) logging and features needed for Einstein@Home.
Please contact me before changing or removing any of this.

Conflicts:
	sched/db_dump.cpp
	sched/file_deleter.cpp
	sched/validator.cpp
2014-05-26 14:42:36 +02:00
Bernd Machenschalk 2f6d140c56 validator:
added options -min_wu_id and -max_wu_id to validator
2014-05-23 12:06:00 +02:00
David Anderson de6540cbc0 scheduler: if a result was aborted by user, don't count it as an error 2014-05-22 23:54:56 -07:00
David Anderson b17455816d db_dump: include badges in XML stats export
I did this by including list of badges in the tables.xml file,
and writing the list of badge assignments to 2 new files,
badge_user.gz (for users) and badge_team.gz (for teams).

I considered including the badges within the <user> and <team> elements.
However, this would require enumerating the badges for a particular user
within the enumeration of users, which doesn't work;
only one enumeration can be active at a time.
Plus it would be less efficient, and db_dump already takes
a half hour on a big project.
2014-05-18 19:19:05 -07:00
David Anderson e5810f3061 client/server: change implementation of "exact fraction done".
My last commit did this using a new API call.
But this would require rebuilding apps any time you want to change it;
too much work.
So instead make it an attribute of apps,
which you can set via the admin web interface.

Corresponding changes to client.
2014-05-04 00:02:32 -07:00
David Anderson 1e6e22449d remote job submission: minor bug fix 2014-04-11 15:54:41 -07:00
David Anderson fec574f4e8 create_work: increase the efficiency of bulk job creation
The job submission RPC handler (PHP) originally ran the
create_work program once per job.
This took about 1.5 minutes to create 1000 jobs.
Recently I changed this so that create_work only is run once;
it does one SQL insert per job.
Disappointingly, this was only slightly faster: 1 min per 1000 jobs.

This commit changes create_work to create multiple jobs per SQL insert
(as many as will fit in a 1 MB query, which is the default limit).
This speeds things up by a factor of 100: 1000 jobs in 0.5 sec.
2014-04-10 23:53:19 -07:00
David Anderson fc7c75b200 server: parse peak memory/disk info from client, store in DB, display in web
The latest client reports the peak working set size, swap size,
and disk usage for completed jobs.
Add fields to the results table to store these.
Parse them in scheduler request messages, and write to the DB.
Display them in the result web page.

This data can be used to improve (or even automate)
the job estimates for memory and disk usage.
2014-04-02 19:35:59 -07:00
David Anderson df1d8e2bde server: store and display gpu_active_frac
- gpu_active_frac is the fraction of time GPU use is allowed
  while the client is running.
  Previously the client reported it but we weren't storing it in the DB.
  We may need it in the future for batch scheduling logic.
- fix a crashing bug in scheduler
- client: minor message tweak
2014-03-06 13:23:52 -08:00
David Anderson 2e4d561647 sample work generator: wait until transitioner has processed jobs before creating any more
Work generators create jobs (workunits);
the transitioner creates instances (results).
If a work generator tries to maintain a certain number of unsent results
(as the sample work generator does)
it must wait for a bit, after creating jobs,
to let the transitioner create instances of those jobs.
The example work generator waited 5 seconds.

Problem: on a heavily loaded project, the transitioner can fall behind -
minutes or hours behind.
So the above policy can create way too many jobs.

Solution: after creating jobs, the sample work generator
notes the current time X,
then waits until the transitioner catches up to time X
(i.e., until the min workunit.transition_time exceeds X).
This ensures that instances have been created for all the new jobs.

Other work generators the limit the number of unsent jobs
should use the same technique;
use min_transition_time(x) to get the min transition time.

Code cleanup: get_double should be a member of DB_CONN, not DB_BASE.
2013-12-14 16:36:18 -08:00
David Anderson 93d6f5ef16 transitioner: don't set result.mod_time to null; this fails if the DB field has accidentally been marked as not null. 2013-07-18 17:10:54 -07:00
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 f25cf0836a Include <cmath> instead of <math.h> various places 2013-05-27 16:44:22 -07:00
David Anderson ba68f452a0 server: fix bug related to job-size matching
Problem: a workunit could error out with unsent results.
The feeder skips such results, but the size_regulator counts them
and doesn't so doesn't promote any new results.
Solution: the feeder scans for results even with workunit errors.
If marks these results as state OVER, outcome DIDNT_NEED
2013-05-24 20:11:14 -07:00
David Anderson cde42fcbcc server: parse product_name in scheduler request, store in DB
This will let projects see what kind of device each Android host is,
possibly helping with app debugging.
2013-05-23 23:30:42 -07:00
David Anderson 1a1a01c103 - server: initialize result.size_class and workunit.size_class to -1 2013-05-03 15:09:45 -07:00
David Anderson 0c430ce1fa Add support for multi-size apps
See http://boinc.berkeley.edu/trac/wiki/MultiSize
The components of this include:
- DB changes:
    add size_class to workunit and result
    n_size_classes to app; >1 means multi-size
- size_regulator daemon program: change results states
    from INACTIVE to UNSENT carefully
- size_census program; writes quantile info in flat files
- transitioner: when creating results for multi-size apps,
    set server state to INACTIVE
- sched shmem (feeder): read quantile info from flat files,
    store in shared memory
- scheduler (score-based scheduling): for multi-size apps,
    add component to score function for size class.
- show_shmem: show result size class
- make_work (and other callers of count_unsent_results()):
    count both INACTIVE and UNSENT
- create_work: add --size_class cmdline option

Also:
- if get MySQL errors in upgrade, don't rewrite db_version
2013-04-25 00:27:35 -07:00