[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2481 - in GNUnet/src/applications: fs/module gap
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2481 - in GNUnet/src/applications: fs/module gap |
Date: |
Sat, 11 Mar 2006 12:58:20 -0800 (PST) |
Author: grothoff
Date: 2006-03-11 12:58:17 -0800 (Sat, 11 Mar 2006)
New Revision: 2481
Modified:
GNUnet/src/applications/fs/module/anonymity.c
GNUnet/src/applications/fs/module/fs.c
GNUnet/src/applications/fs/module/migration.c
GNUnet/src/applications/fs/module/ondemand.c
GNUnet/src/applications/fs/module/querymanager.c
GNUnet/src/applications/gap/gap.c
GNUnet/src/applications/gap/gaptest.c
Log:
1014
Modified: GNUnet/src/applications/fs/module/anonymity.c
===================================================================
--- GNUnet/src/applications/fs/module/anonymity.c 2006-03-11 13:41:03 UTC
(rev 2480)
+++ GNUnet/src/applications/fs/module/anonymity.c 2006-03-11 20:58:17 UTC
(rev 2481)
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c 2006-03-11 13:41:03 UTC (rev
2480)
+++ GNUnet/src/applications/fs/module/fs.c 2006-03-11 20:58:17 UTC (rev
2481)
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
@@ -81,6 +81,8 @@
static Mutex lock;
+static int migration;
+
/**
* ID of the FS table in the DHT infrastructure.
*/
@@ -180,8 +182,9 @@
"FS received GAP-PUT request (query: `%s')\n",
&enc);
#endif
- ret = datastore->putUpdate(query,
- dv);
+ if (migration)
+ ret = datastore->putUpdate(query,
+ dv);
FREE(dv);
return ret;
}
@@ -1070,6 +1073,9 @@
GNUNET_ASSERT(sizeof(NBlock) == 716);
GNUNET_ASSERT(sizeof(KNBlock) == 1244);
+ migration = testConfigurationString("FS",
+ "ACTIVEMIGRATION",
+ "YES");
hash("GNUNET_FS",
strlen("GNUNET_FS"),
&dht_table);
Modified: GNUnet/src/applications/fs/module/migration.c
===================================================================
--- GNUnet/src/applications/fs/module/migration.c 2006-03-11 13:41:03 UTC
(rev 2480)
+++ GNUnet/src/applications/fs/module/migration.c 2006-03-11 20:58:17 UTC
(rev 2481)
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c 2006-03-11 13:41:03 UTC
(rev 2480)
+++ GNUnet/src/applications/fs/module/ondemand.c 2006-03-11 20:58:17 UTC
(rev 2481)
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
Modified: GNUnet/src/applications/fs/module/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/module/querymanager.c 2006-03-11 13:41:03 UTC
(rev 2480)
+++ GNUnet/src/applications/fs/module/querymanager.c 2006-03-11 20:58:17 UTC
(rev 2481)
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c 2006-03-11 13:41:03 UTC (rev 2480)
+++ GNUnet/src/applications/gap/gap.c 2006-03-11 20:58:17 UTC (rev 2481)
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
@@ -58,6 +58,18 @@
#define IDLE_LOAD_THRESHOLD 50
/**
+ * For how many different hosts can we have a query pending (at most).
+ * If this threshold is crossed, the hosts waiting list is reset.
+ */
+#define MAX_HOSTS_WAITING 16
+
+/**
+ * How many seen values do we keep at most for any given query before
+ * we kill it (or at least start to do a probabilistic drop).
+ */
+#define MAX_SEEN_VALUES 32
+
+/**
* By which amount do we decrement the TTL for simple forwarding /
* indirection of the query; in milli-seconds. Set somewhat in
* accordance to your network latency (above the time it'll take you
@@ -1195,6 +1207,8 @@
if (equalsHashCode512(&ite->destination[i].hashPubKey,
&sender->hashPubKey))
return SYSERR;
+ if (ite->hostsWaiting >= MAX_HOSTS_WAITING)
+ ite->hostsWaiting = 0; /* RESET to avoid unbounded growth (#1014) */
} else {
ite->successful_local_lookup_in_delay_loop = NO;
/* different request, flush pending queues */
@@ -1568,6 +1582,9 @@
if (equalsHashCode512(&hc,
&cls->hashes[i]))
return OK; /* drop, duplicate entry in DB! */
+ if ( (cls->valueCount > MAX_SEEN_VALUES) &&
+ (randomi_weak(cls->valueCount) > 8) )
+ return OK; /* statistical drop, too many replies to keep in memory */
GROW(cls->values,
cls->valueCount,
cls->valueCount+1);
@@ -1845,6 +1862,20 @@
}
sendReply(ite,
&msg->header);
+ if (ite->seenIndex > MAX_SEEN_VALUES * 2) {
+ /* kill routing entry -- we have seen so many different
+ replies already that we cannot afford to continue
+ to keep track of all of the responses seen (#1014) */
+ GROW(ite->destination,
+ ite->hostsWaiting,
+ 0);
+ GROW(ite->seen,
+ ite->seenIndex,
+ 0);
+ ite->priority = 0;
+ ite->type = 0;
+ ite->ttl = 0;
+ }
}
MUTEX_UNLOCK(&lookup_exclusion);
prio += claimReward(&msg->primaryKey, hostId);
Modified: GNUnet/src/applications/gap/gaptest.c
===================================================================
--- GNUnet/src/applications/gap/gaptest.c 2006-03-11 13:41:03 UTC (rev
2480)
+++ GNUnet/src/applications/gap/gaptest.c 2006-03-11 20:58:17 UTC (rev
2481)
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2481 - in GNUnet/src/applications: fs/module gap,
grothoff <=