Commit Graph

726 Commits

Author SHA1 Message Date
Kevin Reed 436409a40b server: Replace host index on userid with one based on userid and host_cpid 2018-09-07 10:10:03 -05:00
Kevin Reed 77f9078398 server - add indexes to host in order to make scheduler requests quick
for users with large number of devices (i.e at least 50k)
2018-08-23 15:10:48 -05:00
David Anderson 83b9de7b08
Merge pull request #2518 from BOINC/dpa_credit4
Server: add support for post-assigned credit
2018-05-28 17:32:15 -07:00
Kevin Reed 7ce2370160 db: change index names to not be shortened 2018-05-17 08:46:37 -05:00
Kevin Reed 328a901ff3 db: add indexes in support delete account 2018-05-16 15:38:34 -05:00
David Anderson b857a37008 Add support for post-assigned credit
Add --post_assigned_credit option to validator.
If set, it gets claimed credit from result.claimed_credit
(put there by project's init_result() function).
The claimed credit of the canonical result is the job's granted credit.

Also changed --credit_from_runtime so that it averages
claimed credit across instances,
instead of just using the canonical instance.
2018-05-15 14:55:30 -07: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
David Anderson 02a59808b9
Merge pull request #2500 from Uplinger/email_change_notification
Email change notification
2018-05-15 09:42:20 -07:00
Keith Uplinger 12a3933d76 Updated boinc_db.cpp to print email address change columns. 2018-05-14 19:09:00 -05:00
Keith Uplinger fecbfa3bd2 Modified the table definition for user table to have email_addr_change_time to be indexed per davids suggestion. 2018-05-10 09:34:39 -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
Keith Uplinger 7749c643a6 Added database call for previous email address in c++ code. 2018-05-08 10:02:34 -05:00
David Anderson d0fcd1e729 Various tweaks to Keith's changes.
Keith, call me if you want to discuss any of these.
2018-05-07 16:15:51 -07:00
David Anderson 128fcda228 Add fields at end of table 2018-05-07 15:23:01 -07:00
David Anderson cc3171fa5b Update comments in db/schema.sql
Please read these before changing the schema.
Recent schema changes don't follow these rules.
At some point they should be revised.
2018-05-07 15:13:14 -07: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
Kevin Reed b7bb437aba web: change primary key for user_deleted and host_deleted to simply be
id instead of userid and hostid
2018-05-03 10:38:22 -05:00
Kevin Reed e821de2643 web: add logic to insert into user_deleted and host_deleted when
deleting a user
2018-05-01 17:08:29 -05:00
Kevin Reed fd06682839 web: add table definitions for user_deleted and host_deleted 2018-04-30 17:22:36 -05:00
Keith Uplinger a1b03c8cf2 Merge remote-tracking branch 'upstream/knr_token2' into email_change_notification
Conflicts:
	html/ops/db_update.php
2018-04-23 13:31:14 -05:00
Keith Uplinger a2a78a611d Merge branch 'master' into email_change_notification
Conflicts:
	html/user/edit_email_action.php
2018-04-19 11:58:40 -05:00
Kevin Reed 638f8284a7 web: Fix issue caused by MariaDB 10.2 allowing column defaults to use
functions but earlier versions and MySQL not allowing it
2018-04-18 15:28:16 -05:00
Keith Uplinger 2b16e60a32 Include previous_email_addr and email_addr_change_time to database schema.sql for user 2018-04-13 13:55:57 -05:00
Kevin Reed 3e585ede29 web: add default values to not null team columns that are not assigned when team
is created
2018-04-06 15:48:52 -05:00
Kevin Reed 4a6246a8bb web: create token table and php object to interact with token table.
Add script that will delete expired tokens once a day
2018-04-06 13:30:01 -05:00
Kevin Reed 4c36d4c317 web: provide defaults for user.login_token and user.login_token_time
as the lack of them was preventing registration from working on (at
least on MariaDB 10.2)
2018-03-08 12:10:29 -06:00
Kevin Reed 0f9425c3ad Revert "web: provide defaults for user.login_token and user.login_token_time as"
This commit wasn't atomic, so reverting and redoing it as two seperate
commits

This reverts commit 855ff67e47.
2018-03-08 11:37:45 -06:00
Kevin Reed 855ff67e47 web: provide defaults for user.login_token and user.login_token_time as
the lack of them was preventing registration from working on (at least
on MariaDB 10.2)
2018-03-08 10:13:31 -06: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
David Anderson 15f28c96b6 Add server-side support for simplified register/download/attach
Add the server parts of the scheme described here:
https://boinc.berkeley.edu/trac/wiki/SimpleAttach

This includes:
- add login_token table and function for creating login tokens
- add Web RPC login_token_lookup.php for mapping token to auth
- change concierge protocol to take project ID and login token
- update download.php so that it gets client version info
    from versions.xml (from BOINC web site)
    and displays buttons with OS name, versions and file sizes
    like on the BOINC download page
- make "register.php" work

I've tested this all the way through downloading the installer file
with the augmented name.
Changes to the installer and client are needed to complete the system.
2017-10-30 21:38:07 -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
David Anderson 6485e50647 DB: add indices to credit_user and credit_team
Should make queries for top items fast.
2017-03-17 11:45:45 -07:00
David Anderson 61710233cd Project creation: fix a couple of bugs 2017-03-06 11:35:00 -08:00
David Anderson 3f0f36ac5a remote file management: allow long filenames
Originally, the idea for remote file management was that
the physical name of a file was its md5, or jf_md5.
This was changed to let the submitter choose the name.
But in the DB (job_file.md5) we only kept 64 chars.

Change the field name to job_file.name, and change it to varchar(255)
2017-02-17 13:51:30 -08: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 1fd5978270 add mod_time field to team table (for Drupal team import; not sure why) 2016-01-27 14:56:31 -08: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 7a00aa4976 web: changes to support MySQL strict mode
In "strict mode", inserts fail if they don't supply values
for columns with no default defined in the schema
(in non-strict mode, 0 and '' are implicit defaults).
Starting with MySQL version 5.6, strict mode is the default.
This breaks some of the BOINC web code,
which does inserts without giving values to some columns.

There are two ways to solve this:

1) change the schema to give defaults everywhere
2) change the PHP code to supply values for more columns.

I'm using 1) in some cases and 2) in others.
This commit fixes some of the errors; there are others.
2015-04-16 00:01:06 -07:00
David Anderson 5ad43a6509 validator: add --wu_id N option for debugging single WU 2015-04-03 20:00:13 -07:00