gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r3784 - in GNUnet/src/applications: datastore fs/fsui fs/mo


From: grothoff
Subject: [GNUnet-SVN] r3784 - in GNUnet/src/applications: datastore fs/fsui fs/module fs/tools sqstore_sqlite
Date: Wed, 15 Nov 2006 21:38:46 -0800 (PST)

Author: grothoff
Date: 2006-11-15 21:38:38 -0800 (Wed, 15 Nov 2006)
New Revision: 3784

Modified:
   GNUnet/src/applications/datastore/prefetch.c
   GNUnet/src/applications/fs/fsui/downloadtest.c
   GNUnet/src/applications/fs/fsui/fsuitest.c
   GNUnet/src/applications/fs/fsui/searchtest.c
   GNUnet/src/applications/fs/fsui/serializetest.c
   GNUnet/src/applications/fs/fsui/upload.c
   GNUnet/src/applications/fs/module/migration.c
   GNUnet/src/applications/fs/tools/gnunet-insert.c
   GNUnet/src/applications/sqstore_sqlite/sqlite.c
Log:
fix

Modified: GNUnet/src/applications/datastore/prefetch.c
===================================================================
--- GNUnet/src/applications/datastore/prefetch.c        2006-11-16 03:13:40 UTC 
(rev 3783)
+++ GNUnet/src/applications/datastore/prefetch.c        2006-11-16 05:38:38 UTC 
(rev 3784)
@@ -112,10 +112,20 @@
     }
   }
 #if DEBUG_PREFETCH
-  GE_LOG(ectx,
-        GE_DEBUG | GE_REQUEST | GE_USER,
-        "Adding content to prefetch buffer (%u)\n",
-        rCBPos);
+  {
+    EncName enc;
+
+    hash2enc(key,
+            &enc);
+    GE_LOG(ectx,
+          GE_DEBUG | GE_BULK | GE_USER,
+          "Adding content `%s' of type %u/size %u/exp %llu to prefetch buffer 
(%u)\n",
+          &enc,
+          ntohl(value->type),
+          ntohl(value->size),
+          ntohll(value->expirationTime),
+          rCBPos);
+  }
 #endif
   randomContentBuffer[rCBPos].key = *key;
   randomContentBuffer[rCBPos].used = 0;

Modified: GNUnet/src/applications/fs/fsui/downloadtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/downloadtest.c      2006-11-16 03:13:40 UTC 
(rev 3783)
+++ GNUnet/src/applications/fs/fsui/downloadtest.c      2006-11-16 05:38:38 UTC 
(rev 3784)
@@ -283,6 +283,7 @@
                            YES,
                            NO,
                            NO,
+                           get_time() + 5 * cronHOURS,
                            meta,
                            kuri,
                            kuri);

Modified: GNUnet/src/applications/fs/fsui/fsuitest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest.c  2006-11-16 03:13:40 UTC (rev 
3783)
+++ GNUnet/src/applications/fs/fsui/fsuitest.c  2006-11-16 05:38:38 UTC (rev 
3784)
@@ -170,6 +170,7 @@
                            YES,
                            NO,
                            NO,
+                           get_time() + 5 * cronHOURS,
                            meta,
                            kuri,
                            kuri);

Modified: GNUnet/src/applications/fs/fsui/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/searchtest.c        2006-11-16 03:13:40 UTC 
(rev 3783)
+++ GNUnet/src/applications/fs/fsui/searchtest.c        2006-11-16 05:38:38 UTC 
(rev 3784)
@@ -191,6 +191,7 @@
                         YES,
                         NO,
                         NO,
+                        get_time() + 5 * cronHOURS,
                         meta,
                         kuri,
                         kuri);

Modified: GNUnet/src/applications/fs/fsui/serializetest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/serializetest.c     2006-11-16 03:13:40 UTC 
(rev 3783)
+++ GNUnet/src/applications/fs/fsui/serializetest.c     2006-11-16 05:38:38 UTC 
(rev 3784)
@@ -223,6 +223,7 @@
                            YES,
                            NO,
                            NO,
+                           get_time() + 5 * cronHOURS,
                            meta,
                            kuri,
                            kuri);

Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c    2006-11-16 03:13:40 UTC (rev 
3783)
+++ GNUnet/src/applications/fs/fsui/upload.c    2006-11-16 05:38:38 UTC (rev 
3784)
@@ -529,6 +529,7 @@
                 int doIndex,
                 int doExtract,
                 int individualKeywords,
+                cron_t expiration,
                 const struct ECRS_MetaData * md,
                 const struct ECRS_URI * globalURI,
                 const struct ECRS_URI * keyUri) {
@@ -556,6 +557,7 @@
   shared->dsc = dsc;
   shared->dscClosure = dscClosure;
   shared->extractors = extractors;
+  shared->expiration = expiration;
   shared->ctx = ctx;
   shared->handle = NULL;
   shared->global_keywords = globalURI != NULL ? ECRS_dupUri(globalURI) : NULL;

Modified: GNUnet/src/applications/fs/module/migration.c
===================================================================
--- GNUnet/src/applications/fs/module/migration.c       2006-11-16 03:13:40 UTC 
(rev 3783)
+++ GNUnet/src/applications/fs/module/migration.c       2006-11-16 05:38:38 UTC 
(rev 3784)
@@ -135,6 +135,12 @@
     }
   }
 
+#if DEBUG_MIGRATION
+  GE_LOG(ectx,
+        GE_DEBUG | GE_BULK | GE_USER,
+        "Migration: random lookup in datastore returned type %d.\n",
+        ntohl(content->type));
+#endif
   if (ntohl(content->type) == ONDEMAND_BLOCK) {
     if (ONDEMAND_getIndexed(datastore, 
                            content,

Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c    2006-11-16 03:13:40 UTC 
(rev 3783)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c    2006-11-16 05:38:38 UTC 
(rev 3784)
@@ -454,7 +454,8 @@
                        priority,                       
                        ! do_insert,
                        YES,
-                       ! do_no_direct_references,                      
+                       ! do_no_direct_references,
+                       start_time + 2 * cronYEARS,
                        meta,
                        gloKeywords,
                        topKeywords);

Modified: GNUnet/src/applications/sqstore_sqlite/sqlite.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlite.c     2006-11-16 03:13:40 UTC 
(rev 3783)
+++ GNUnet/src/applications/sqstore_sqlite/sqlite.c     2006-11-16 05:38:38 UTC 
(rev 3784)
@@ -599,10 +599,14 @@
     MUTEX_UNLOCK(db->DATABASE_Lock_);
     return SYSERR;
   }
-
   count    = 0;
-  lastPrio = 0;
-  lastExp  = 0;
+  if (inverseOrder) {
+    lastPrio = 0x7FFFFFFF;
+    lastExp  = 0x7FFFFFFFFFFFFFFFLL;
+  } else {
+    lastPrio = 0;
+    lastExp  = 0;
+  }
   memset(&key, 0, sizeof(HashCode512));
   while (1) {
     sqlite3_bind_blob(stmt,
@@ -938,18 +942,19 @@
   unsigned long long expir;
   sqliteHandle *dbh;
 #if DEBUG_SQLITE
-  EncName enc;
+  EncName enc; 
 
   IF_GELOG(ectx,
-          GE_DEBUG | GE_REQUEST | GE_USER,
+          GE_DEBUG | GE_BULK | GE_USER,
           hash2enc(key,
                    &enc));
   GE_LOG(ectx,
-        GE_DEBUG | GE_REQUEST | GE_USER,
-        "Storing in database block with type %u, key `%s' and priority %u.\n",
+        GE_DEBUG | GE_BULK | GE_USER,
+        "Storing in database block with type %u/key `%s'/priority 
%u/expiration %llu.\n",
         ntohl(*(int*)&value[1]),
         &enc,
-        ntohl(value->prio));
+        ntohl(value->prio),
+        ntohll(value->expirationTime));
 #endif
 
   if ( (ntohl(value->size) < sizeof(Datastore_Value)) ) {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]