From 94948e691223786e549004085f633f37683e2ee1 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 12 Jan 2023 15:24:10 +0300 Subject: [PATCH] Remove json decoding when retrieving data from db * dump.lisp (sampledata-db-get): Remove json-decoding. This fixes the following heap error: Heap exhausted (no more space for allocation). 274563072 bytes available, 2684355136 requested. --- dump.lisp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dump.lisp b/dump.lisp index 407459a..3cdd471 100644 --- a/dump.lisp +++ b/dump.lisp @@ -180,11 +180,9 @@ the hash stream" "Get sampledata with KEY from DB. KEY may be a hash or a string. If it is a string, it is encoded into octets before querying the database." - (json:decode-json-from-string - (utf-8-bytes-to-string - (g3t db (if (stringp key) - (string-to-utf-8-bytes key) - key))))) + (g3t db (if (stringp key) + (string-to-utf-8-bytes key) + key))) (defun sampledata-db-put (db data &optional metadata) "Put DATA into DB. Associate HEADER, representing the name of the