mirror of https://github.com/BOINC/boinc.git
- scheduler: fix crashing bug (don't memset SCHED_REQUEST).
svn path=/trunk/boinc/; revision=24660
This commit is contained in:
parent
d2361a0613
commit
4111c5696c
|
@ -8706,3 +8706,13 @@ Charlie 28 Nov 2011
|
|||
Events.h
|
||||
sg_PanelBase.cpp,.h
|
||||
sg_TaskPanel.cpp,.h
|
||||
|
||||
David 28 Nov 2011
|
||||
- scheduler: fix crashing bug (don't memset SCHED_REQUEST).
|
||||
|
||||
sched/
|
||||
sched_result.cpp
|
||||
handle_request.cpp
|
||||
sched_types.cpp
|
||||
ssim/
|
||||
ssim.cpp
|
||||
|
|
|
@ -1362,7 +1362,6 @@ void handle_request(FILE* fin, FILE* fout, char* code_sign_key) {
|
|||
g_reply = &sreply;
|
||||
g_wreq = &sreply.wreq;
|
||||
|
||||
memset(&sreq, 0, sizeof(sreq));
|
||||
sreply.nucleus_only = true;
|
||||
|
||||
log_messages.set_indent_level(1);
|
||||
|
|
|
@ -96,7 +96,6 @@ int handle_results() {
|
|||
unsigned int i;
|
||||
int retval;
|
||||
RESULT* rp;
|
||||
bool changed_host=false;
|
||||
|
||||
if (g_request->results.size() == 0) return 0;
|
||||
|
||||
|
@ -283,7 +282,6 @@ int handle_results() {
|
|||
"[HOST#%d] [RESULT#%d] [WU#%d] Allowing result because same USER#%d\n",
|
||||
g_reply->host.id, srip->id, srip->workunitid, g_reply->host.userid
|
||||
);
|
||||
changed_host = true;
|
||||
}
|
||||
} // hostids do not match
|
||||
|
||||
|
|
|
@ -185,6 +185,7 @@ const char* SCHEDULER_REQUEST::parse(XML_PARSER& xp) {
|
|||
core_client_major_version = 0;
|
||||
core_client_minor_version = 0;
|
||||
core_client_release = 0;
|
||||
core_client_version = 0;
|
||||
rpc_seqno = 0;
|
||||
work_req_seconds = 0;
|
||||
cpu_req_secs = 0;
|
||||
|
|
|
@ -36,13 +36,13 @@
|
|||
// We simulate policies based on coding and replication.
|
||||
//
|
||||
// Coding means that data is divided into M = N+K units,
|
||||
// of which any N are sufficient to reconstruct the data.
|
||||
// of which any N are sufficient to reconstruct the original data.
|
||||
//
|
||||
// The units in an encoding can themselves be encoded.
|
||||
// In general we model C levels of encoding.
|
||||
//
|
||||
// The bottom-level data units ("chunks") are stored on hosts,
|
||||
// with R-fold replication
|
||||
// possibly with replication
|
||||
|
||||
#define ENCODING_N 4
|
||||
#define ENCODING_K 2
|
||||
|
@ -123,6 +123,9 @@ struct CHUNK_ON_HOST : public EVENT {
|
|||
bool present_on_host;
|
||||
bool transfer_in_progress; // upload if present_on_host, else download
|
||||
virtual void handle();
|
||||
inline bool download_in_progress() {
|
||||
return (transfer_in_progress && !present_on_host);
|
||||
}
|
||||
};
|
||||
|
||||
static int next_host_id=0;
|
||||
|
@ -219,7 +222,12 @@ struct CHUNK : DATA_UNIT {
|
|||
|
||||
}
|
||||
virtual void delete_chunks_from_server() {
|
||||
printf("%0f: deleting %s from server\n", sim.now, name);
|
||||
set<CHUNK_ON_HOST*>::iterator i;
|
||||
for (i=hosts.begin(); i!=hosts.end(); i++) {
|
||||
CHUNK_ON_HOST* c = *i;
|
||||
if (c->download_in_progress()) return;
|
||||
}
|
||||
printf("%.0f: deleting %s from server\n", sim.now, name);
|
||||
_is_present_on_server = false;
|
||||
}
|
||||
virtual void now_present() {
|
||||
|
|
Loading…
Reference in New Issue