Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions goleveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ func (db *GoLevelDB) Get(key []byte) ([]byte, error) {

// Has implements DB.
func (db *GoLevelDB) Has(key []byte) (bool, error) {
bytes, err := db.Get(key)
if err != nil {
return false, err
if len(key) == 0 {
return false, errKeyEmpty
}
return bytes != nil, nil
return db.db.Has(key, nil)
}

// Set implements DB.
Expand Down
4 changes: 3 additions & 1 deletion tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ RUN apt update \
ARG ROCKSDB=9.8.4

# Install RocksDB
# GCC 12 reports false-positive uninitialized warnings from its AVX-512
# intrinsic headers while compiling RocksDB's bundled xxHash implementation.
RUN \
wget -q https://github.com/facebook/rocksdb/archive/refs/tags/v${ROCKSDB}.tar.gz \
&& tar -zxf v${ROCKSDB}.tar.gz \
&& cd rocksdb-${ROCKSDB} \
&& DEBUG_LEVEL=0 CXXFLAGS="-Wno-maybe-uninitialized" make -j4 shared_lib \
&& DEBUG_LEVEL=0 CXXFLAGS="-Wno-maybe-uninitialized -Wno-error=uninitialized" make -j4 shared_lib \
&& make install-shared \
&& ldconfig \
&& cd .. \
Expand Down
Loading