From 5e87181d81e73f5285bacfd3934bc5929f38533f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 18 Jun 2012 17:57:33 +0000 Subject: [PATCH] - client: it's possible for a host to get app versions for a given app that have different platforms and different version #s. The client was erroneously deleting the one w/ the lower version when it was no longer in use. Fix: in garbage collection, consider one version to supercede another only if they have the same platform svn path=/trunk/boinc/; revision=25770 --- checkin_notes | 13 +++++++++++++ client/client_state.cpp | 8 +++++--- vda/ssim.cpp | 6 +++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index 99360b002f..1c63196fbb 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4372,3 +4372,16 @@ Charlie 18 June 2012 mac_installer/ PostInstall.cpp Uninstall.cpp + +David 18 June 2012 + - client: it's possible for a host to get app versions for + a given app that have different platforms and different version #s. + The client was erroneously deleting the one w/ the lower version + when it was no longer in use. + Fix: in garbage collection, consider one version to supercede another + only if they have the same platform + + client/ + client_state.cpp + vda/ + ssim.cpp diff --git a/client/client_state.cpp b/client/client_state.cpp index d8d80cc047..e33fa9dd41 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -1415,7 +1415,8 @@ bool CLIENT_STATE::garbage_collect_always() { // go through APP_VERSIONs; // delete any not referenced by any WORKUNIT - // and superceded by a more recent version. + // and superceded by a more recent version + // for the same platform and plan class // avp_iter = app_versions.begin(); while (avp_iter != app_versions.end()) { @@ -1424,9 +1425,10 @@ bool CLIENT_STATE::garbage_collect_always() { found = false; for (j=0; japp==avp->app + if (avp2->app == avp->app + && avp2->version_num > avp->version_num && (!strcmp(avp2->plan_class, avp->plan_class)) - && avp2->version_num>avp->version_num + && (!strcmp(avp2->platform, avp->platform)) ) { found = true; break; diff --git a/vda/ssim.cpp b/vda/ssim.cpp index b978743659..d958770feb 100644 --- a/vda/ssim.cpp +++ b/vda/ssim.cpp @@ -477,11 +477,15 @@ int main(int argc, char** argv) { // default policy // policy.replication = 2; - policy.coding_levels = 1; + policy.coding_levels = 2; policy.codings[0].n = 10; policy.codings[0].k = 6; policy.codings[0].m = 16; policy.codings[0].n_upload = 12; + policy.codings[1].n = 10; + policy.codings[1].k = 6; + policy.codings[1].m = 16; + policy.codings[1].n_upload = 12; for (int i=1; i