Changeset: e886ebce5259 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e886ebce5259
Modified Files:
        sql/ChangeLog.Aug2024
        sql/backends/monet5/sql.c
Branch: Aug2024
Log Message:

Use sys.storage() phash column to indicate a hash may exist on disk.


diffs (34 lines):

diff --git a/sql/ChangeLog.Aug2024 b/sql/ChangeLog.Aug2024
--- a/sql/ChangeLog.Aug2024
+++ b/sql/ChangeLog.Aug2024
@@ -1,6 +1,11 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Tue Jul 16 2024 Sjoerd Mullender <sjo...@acm.org>
+- The "phash" column in the sys.storage() table now indicates whether a
+  hash exists.  If the hash is not loaded but there is a hash available
+  on disk, the phash value is "true", but the "hashes" value is 0.
+
 * Thu Jul 11 2024 Martin van Dinther <martin.van.dint...@monetdbsolutions.com>
 - Added execution privilege on all sys.generate_series(first, limit)
   and sys.generate_series(first, limit, stepsize) functions to public,
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -4256,12 +4256,14 @@ sql_storage(Client cntxt, MalBlkPtr mb, 
                                                                goto bailout1;
 
                                                        
MT_rwlock_rdlock(&bs->thashlock);
+                                                       /* one lock, two 
values: hash size, and
+                                                        * whether we (may) 
have a hash */
                                                        sz = 
hashinfo(bs->thash, bs->batCacheid);
+                                                       bitval = bs->thash != 
NULL;
                                                        
MT_rwlock_rdunlock(&bs->thashlock);
                                                        if (BUNappend(indices, 
&sz, false) != GDK_SUCCEED)
                                                                goto bailout1;
 
-                                                       bitval = 0; /* 
HASHispersistent(bs); */
                                                        if (BUNappend(phash, 
&bitval, false) != GDK_SUCCEED)
                                                                goto bailout1;
 
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to