tecbot / gorocksdb Goto Github PK
View Code? Open in Web Editor NEWgorocksdb is a Go wrapper for RocksDB
Home Page: http://rocksdb.org
License: MIT License
gorocksdb is a Go wrapper for RocksDB
Home Page: http://rocksdb.org
License: MIT License
Concerning https://github.com/facebook/rocksdb/wiki/SeekForPrev, I'll just leave this issue here as a humble request so that someone willing to wrap this method introduced in 4.13 may be encouraged to do it and have my gratitude.
Commit 0c8578d adds an option from rocks 5.4.0, but it looks like the CockroachDB embedded rocks build ( https://github.com/cockroachdb/c-rocksdb ) is now deprecated, and hasn't been updated to 5.4
So the user will know which version of RocksDB they should install. Or maybe gorocksdb should use release notes and change log to show this information.
https://github.com/facebook/rocksdb/wiki/Creating-and-Ingesting-SST-files#ingestion-behind
This is needed to use with IngestExternalFile(), which is added in #91.
Failed to compile "options.go" as below functions have been removed in the latest Rocksdb version 5.0 (https://github.com/facebook/rocksdb/pull/1326/files):
rocksdb_options_set_expanded_compaction_factor
rocksdb_options_set_max_grandparent_overlap_factor
rocksdb_options_set_source_compaction_factor
Also the option max_bytes_for_level_multiplier is updated to double (https://github.com/facebook/rocksdb/pull/1427/files).
the only related functions found are
func (db *DB) NewSnapshot() *Snapshot
func (s *Snapshot) Release()
but what is expected is like
func (snap *Snapshot) Get(...
func (snap *Snapshot) NewIterator(...
are there some methods not wrapped to GO?
My understanding here is that if I want to install the embedded version of gorocksdb, I don't need to have RocksDB installed on my machine.
Though go get -tags=embed github.com/tecbot/gorocksdb
fails with the error.
# github.com/tecbot/gorocksdb
src/github.com/tecbot/gorocksdb/options.go:328: not enough arguments in call to _Cfunc_rocksdb_options_set_compression_options
Anything that I might be doing wrong here? My g++ version is 4.8.4.
Could you tell what the equivalent options is for table_options.cache_index_and_filter_blocks?
Hi @tecbot ,
Can you please support Backup and Restore feature which is present in rocksdb(https://github.com/facebook/rocksdb/wiki/How-to-backup-RocksDB%3F) in gorocksdb as well.
Any plans or estimations?
maybe i need a different version from brew ?
x-MacBook-Pro:gorocksdb apple$ pwd
/Users/apple/workspace/go/src/github.com/tecbot/gorocksdb
x-MacBook-Pro:gorocksdb apple$ ls
LICENSE db.go iterator.go options_write.go
README.md db_test.go iterator_test.go slice.go
backup.go doc.go merge_operator.go slice_transform.go
cache.go dynflag.go merge_operator_test.go slice_transform_test.go
cf_handle.go embedflag.go options.go snapshot.go
cf_test.go env.go options_block_based_table.go util.go
compaction_filter.go filter_policy.go options_compaction.go write_batch.go
compaction_filter_test.go filter_policy_test.go options_compression.go write_batch_test.go
comparator.go gorocksdb.c options_flush.go
comparator_test.go gorocksdb.h options_read.go
x-MacBook-Pro:gorocksdb apple$ go build
# github.com/tecbot/gorocksdb
could not determine kind of name for C.rocksdb_options_set_allow_os_buffer
could not determine kind of name for C.rocksdb_options_set_expanded_compaction_factor
could not determine kind of name for C.rocksdb_options_set_filter_deletes
could not determine kind of name for C.rocksdb_options_set_max_grandparent_overlap_factor
could not determine kind of name for C.rocksdb_options_set_memtable_prefix_bloom_bits
could not determine kind of name for C.rocksdb_options_set_memtable_prefix_bloom_probes
could not determine kind of name for C.rocksdb_options_set_source_compaction_factor
x-MacBook-Pro:gorocksdb apple$ brew list rocksdb
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_dump
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_ldb
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_repl_stress
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_sanity_test
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_sst_dump
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_stress
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_undump
/usr/local/Cellar/rocksdb/5.2.1/bin/rocksdb_write_stress
/usr/local/Cellar/rocksdb/5.2.1/include/rocksdb/ (76 files)
/usr/local/Cellar/rocksdb/5.2.1/lib/librocksdb.5.2.1.dylib
/usr/local/Cellar/rocksdb/5.2.1/lib/librocksdb_lite.5.2.1.dylib
/usr/local/Cellar/rocksdb/5.2.1/lib/ (8 other files)
x-MacBook-Pro:gorocksdb apple$
This looks related to
I'm trying out the merge operator stuff, and found that if I don't end the returned string from Name with \000 the log file shows
Options.merge_operator: bitsetMergeOperatorcgocall unavailableclient disconnectedcontent-dispositioncriterion too shortdb@close done T·%vdevice not a streamdirectory not emptydisk quota exceededempty option stringerr must be non-nilexpired certificatefile already closedfile already existsfile does not existfinishAsyncByteReadhttp
...
2017/02/18-17:02:36.890962 7f29cdad4980 [WARN] Unable to persist options in CreateColumnFamily() -- Invalid argument: [RocksDBOptionsParser Error] : A valid statement must have a '='. (at line 104)
Instead of just
Options.merge_operator: bitsetMergeOperator
I have the following version of Rocksdb installed:
#define ROCKSDB_MAJOR 5
#define ROCKSDB_MINOR 1
#define ROCKSDB_PATCH 4
With your latest commit I am getting this error message when I
go get
could not determine kind of name for C.rocksdb_options_set_use_direct_io_for_flush_and_compaction
If I revert back to the commit level from March 29 all of the tests pass !
Add a benchmark like RocksJava
https://github.com/facebook/rocksdb/wiki/RocksJava-Performance-on-Flash-Storage
My Program crashes immediately at start.
In init function I call
gorocksdb.NewDefaultOptions()
SIGILL: illegal instruction
PC=0x7f60fd0b2b82
signal arrived during cgo execution
goroutine 1 [syscall, locked to thread]:
runtime.cgocall_errno(0x40ef4b, 0xc2080b5d80, 0x0)
/usr/local/go/src/runtime/cgocall.go:130 +0xf5 fp=0xc2080b5d60 sp=0xc2080b5d38
github.com/tecbot/gorocksdb._Cfunc_rocksdb_options_create(0x0)
github.com/tecbot/gorocksdb/_obj/_cgo_gotypes.go:690 +0x4d fp=0xc2080b5d80 sp=0xc2080b5d60
github.com/tecbot/gorocksdb.NewDefaultOptions(0xc208036008)
/src/github.com/tecbot/gorocksdb/options.go:71 +0x1f fp=0xc2080b5da8 sp=0xc2080b5d80
store/engine/rocksdb.createNewDb(0x0, 0x0, 0x0, 0x0)
The change introduced in 17991d3 is incompatible with the CockroachDB rocksdb version used for the embedded build, so go get -tags=embed github.com/tecbot/gorocksdb
now fails with a compile error:
# github.com/tecbot/gorocksdb
../../tecbot/gorocksdb/options.go:436: cannot use C.double(value) (type C.double) as type C.int in argument to _Cfunc_rocksdb_options_set_max_bytes_for_level_multiplier
I'm not sure whether that's fixable by this package since you don't control the cockroach version, but thought you'd want to know.
Hi,
I am trying to wrap rocksdb inside my Go code and your wrapper is a great library. But I got a segmentation violation fatal error when "Get" after a single "Merge" call with a fresh database.
The code to reproduce this is,
package main
import (
rocks "github.com/tecbot/gorocksdb"
"fmt"
"runtime"
"sync"
)
type Handler struct {}
func (h *Handler) FullMerge(key, existingValue []byte, operands [][]byte) ([]byte, bool) {
fmt.Println("FullMerge called.")
for _, operand := range operands {
existingValue = append(existingValue, operand...)
}
return existingValue, true
}
func (h *Handler) PartialMerge(key, leftOperand, rightOperand []byte) ([]byte, bool) {
return nil, false
}
func (h *Handler) Name() string {
return "GoRockdisMergeOperator"
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
opts := rocks.NewDefaultOptions()
opts.SetCreateIfMissing(true)
opts.SetMergeOperator(rocks.NewMergeOperator(&Handler{}))
db, err := rocks.OpenDb(opts, "/opt/tmp/rocksdb")
if err != nil {
panic(err)
}
var wg sync.WaitGroup
wg.Add(1)
go func() {
ro := rocks.NewDefaultReadOptions()
wo := rocks.NewDefaultWriteOptions()
err = db.Merge(wo, []byte("test"), []byte("hello"))
if err != nil {
panic(err)
}
data, err := db.Get(ro, []byte("test"))
if err != nil {
panic(err)
}
fmt.Println(string(data.Data()))
wg.Done()
}()
wg.Wait()
}
The error is,
SIGSEGV: segmentation violation
PC=0x420f339
signal arrived during cgo execution
runtime.cgocall(0x40011b0, 0x4491e28)
/usr/local/Cellar/go/1.2/libexec/src/pkg/runtime/cgocall.c:149 +0x11b fp=0x4491e10
github.com/tecbot/gorocksdb._Cfunc_rocksdb_get(0x4513e50, 0x4505350, 0xc210000068, 0x4, 0xc210000078, ...)
github.com/tecbot/gorocksdb/_obj/_cgo_defun.c:318 +0x36 fp=0x4491e28
github.com/tecbot/gorocksdb.(*DB).Get(0xc21004d000, 0xc210000040, 0xc210000068, 0x4, 0x4, ...)
/Users/mijia/Projects/sandbox/gocode/src/github.com/tecbot/gorocksdb/db.go:55 +0xf0 fp=0x4491ea8
main.func·001()
/Users/mijia/Projects/sandbox/gocode/src/github.com/mijia/gorockdis/test/merge_fail.go:52 +0x266 fp=0x4491fa0
...
I am using Mac OS 10.9.1, any clue for this?
Thank you very much.
With Go 1.6 there are new restrictions on what is allowed to cross the Go - C boundary.
See golang/go#12416
https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md
Hi,
I'm not able to get it installed under macOS 10.12.5 with RocksDB 5.4.6.
➜ CGO_CFLAGS="-I/usr/local/opt/rocksdb/include" CGO_LDFLAGS="-L/usr/local/opt/rocksdb/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4" go get github.com/tecbot/gorocksdb
# github.com/tecbot/gorocksdb
could not determine kind of name for C.rocksdb_checkpoint_create
could not determine kind of name for C.rocksdb_checkpoint_object_destroy
could not determine kind of name for C.rocksdb_checkpoint_t
RocksDB is installed using Homebrew and located under /usr/local/opt/rocksdb wich points to the current version.
➜ ls -l /usr/local/opt/rocksdb
lrwxr-xr-x 1 marc admin 23 Jun 22 19:12 /usr/local/opt/rocksdb -> ../Cellar/rocksdb/5.4.6
As you're requiring // #include "rocksdb/c.h"
here I thought that the include path should be /usr/local/opt/rocksdb/include
and not /usr/local/opt/rocksdb/include/rocksdb
? What am I doing wrong?
Thanks Marc
I'm not sure if this is by design, but the underlying *Slice returned by -
func (iter *Iterator) Key() *Slice
is changing as you iterate through each key. At the moment I'm copying the data from the *Slice into a separate []byte slice but would like to fix this if this mutation is unintended.
README leads me to believe that all that I need to do is this:
go get -tags=embed github.com/tecbot/gorocksdb
That goes without a problem (though, as docs say - takes a while),
but then if I try to use it (stripped to simple case):
package main
import "github.com/tecbot/gorocksdb"
func main() {
opts := gorocksdb.NewDefaultOptions()
opts.SetCreateIfMissing(true)
gorocksdb.OpenDb(opts, "test.db")
}
I get:
➜ go build
# github.com/tecbot/gorocksdb
../../tecbot/gorocksdb/backup.go:4:11: fatal error: 'rocksdb/c.h' file not found
#include "rocksdb/c.h"
^
I even tried to use this:
➜ CGO_CFLAGS="-I/..../gopath/src/github.com/cockroachdb/c-rocksdb/internal/include" go build
# github.com/tecbot/gorocksdb
ld: library not found for -lrocksdb
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anything missing in docs?
Thanks!
In build commit e16ff69 the SetBlockCache function was moved to the BlockBasedTableOptions class, but docs.go still uses SetBlockCache in the example
opts := gorocksdb.NewDefaultOptions()
opts.SetBlockCache(gorocksdb.NewLRUCache(3<<30))
opts.SetCreateIfMissing(true)
db, err := gorocksdb.OpenDb(opts, "/path/to/db")
The easiest would be to simply remove the opts.SetBlockCache(gorocksdb.NewLRUCache(3<<30))
line since the default value is probably fine.
A functioning BlockBasedTableOptions example would be
bbto := gorocksdb.NewDefaultBlockBasedTableOptions()
bbto.SetBlockCache(gorocksdb.NewLRUCache(3 << 30))
opts := gorocksdb.NewDefaultOptions()
opts.SetBlockBasedTableFactory(bbto)
opts.SetCreateIfMissing(true)
db, err := gorocksdb.OpenDb(opts, "/path/to/db")
The Bloom Filter example has a similar issue with SetFilterPolicy
moved to BlockBasedTableOptions as well
filter := gorocksdb.NewBloomFilter(10)
opts.SetFilterPolicy(filter)
db, err := gorocksdb.OpenDb(opts, "/path/to/db")
Thanks you guys work, it could be even better if support rate limiter someday.
This is related to the post : https://github.com/facebook/rocksdb/wiki/Memory-usage-in-RocksDB
Currently, gorocksdb supports getting "Memtable" and "Index and filter blocks" size but not "block cache" and "blocks pinned by iterators". In order to get total memory used by RocksDB, all four values are needed. Is there any other way to get total memory usage by RocksDB or should there be support for GetPinnedUsage() and GetUsage()?
Thanks.
Failed to compile "options.go" as below functions have been removed in the latest Rocksdb version 4.11.0:
rocksdb_options_set_filter_deletes
rocksdb_options_set_memtable_prefix_bloom_bits
rocksdb_options_set_memtable_prefix_bloom_probes
Hi,when free a slice ,the code except .(golang 1.7.1,Win7_64,the latest rocksdb with jemalloc)
Exception 0xc0000005 0x1 0x0 0x76ec0967
PC=0x76ec0967
signal arrived during external code execution
github.com/tecbot/gorocksdb._Cfunc_free(0x6b12e0)
github.com/tecbot/gorocksdb/_obj/_cgo_gotypes.go:205 +0x48
github.com/tecbot/gorocksdb.(*Slice).Free(0xc042042400)
d:/gopath/src/github.com/tecbot/gorocksdb/slice.go:32 +0x70
maybe use rocksdb_free to free memory when use dll
In my use case, all values have a fixed size. I'm wondering if I can safely reuse the []byte in the following cases:
I've reviewed the code, but the use of unsafe.Pointer makes me doubt most of what I know on the subject. I've tested it and it seems to work, but wonder if I'm just getting lucky and will face a crash down the road.
A very simply add merge operator
// add merge operator
type Uint64AddOperator struct{}
func (op *Uint64AddOperator) FullMerge(key, existingValue []byte, operands [][]byte) ([]byte, bool) {
var ret []byte
val, err := BytesToUint64(existingValue)
if err != nil {
log.WarnErrorf(err, "existing value corruption. %v", existingValue)
val = 0
// return ret, false
}
for _, bytes := range operands {
tmp, err := BytesToUint64(bytes)
if err != nil {
return ret, false
}
val += tmp
}
ret = Uint64ToBytes(val)
return ret, true
}
func (op *Uint64AddOperator) PartialMerge(key, leftOperand, rightOperand []byte) ([]byte, bool) {
var ret []byte
o1, err := BytesToUint64(leftOperand)
if err != nil {
return ret, false
}
o2, err := BytesToUint64(rightOperand)
if err != nil {
return ret, false
}
newVal := o1 + o2
return Uint64ToBytes(newVal), true
}
func (op *Uint64AddOperator) Name() string {
return "Uint64AddOperator"
}
if the key exists, then it works well, but if the key does not exist, it gets the wrong result.
After upgrading to go 1.8 (release) on OSX, I receive the following error at compile time in a project that uses gorocksdb
:
"_rocksdb_options_set_allow_os_buffer", referenced from:
__cgo_9a8809814800_Cfunc_rocksdb_options_set_allow_os_buffer in options.cgo2.o
(maybe you meant: __cgo_9a8809814800_Cfunc_rocksdb_options_set_allow_os_buffer)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Looks like the latest commits are too new for the embedded c-rocksdb:
# github.com/tecbot/gorocksdb
could not determine kind of name for C.rocksdb_options_set_use_direct_reads
could not determine kind of name for C.rocksdb_options_set_use_direct_writes
17365a1 still builds ok.
Is building for android and ios supported ?
This has been bugs me several days, in TestCustomSliceTransform[1], if I open the old database without Destroy it first, then do the same iteration(without Put changes), the tests fails.
The docs[2] says: "If there is one or more keys in the database matching prefix of lookup_key, RocksDB will place the iterator to the key equal or larger than lookup_key of the same prefix, as for total ordering mode."
I'm not sure is this the expect behavior, it so, how do we do SeekToLast(), isn't this make SeekToLast() useless.
$go test -run TestCustomSliceTransform
...........x
Failures:
* /home/yinhm/gopath/src/github.com/yinhm/gorocksdb/slice_transform_test.go
Line 100:
Expected: '3'
Actual: '6'
(Should be equal)
12 assertions thus far
[1] yinhm@db9e6dd
[2] https://github.com/facebook/rocksdb/wiki/Prefix-Seek-API-Changes
I receive the following error code. So how can I resolve about this
CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go build
../vendor/github.com/tecbot/gorocksdb/backup.go:4:24: fatal error: rocksdb/c.h: No such file or directory
// #include "rocksdb/c.h"
I am trying ot build under MS Windows.
Compiled rockdb using CYGWin, got static and shared libs.
But trying to use ina Golang program got following errors:
$ CGO_CFLAGS="-I ~/rocksdb/include" CGO_LDFLAGS="-L ~/rocksdb -lrocksdb" go test
gorocksdb(.text): rocksdb_cache_create_lru: not defined
gorocksdb(.text): rocksdb_cache_destroy: not defined
gorocksdb(.text): rocksdb_approximate_sizes: not defined
gorocksdb(.text): rocksdb_close: not defined
gorocksdb(.text): rocksdb_compact_range: not defined
gorocksdb(.text): rocksdb_create_iterator: not defined
gorocksdb(.text): rocksdb_create_snapshot: not defined
gorocksdb(.text): rocksdb_delete: not defined
gorocksdb(.text): rocksdb_delete_file: not defined
gorocksdb(.text): rocksdb_destroy_db: not defined
gorocksdb(.text): rocksdb_disable_file_deletions: not defined
gorocksdb(.text): rocksdb_enable_file_deletions: not defined
gorocksdb(.text): rocksdb_flush: not defined
gorocksdb(.text): rocksdb_get: not defined
gorocksdb(.text): rocksdb_livefiles: not defined
gorocksdb(.text): rocksdb_livefiles_count: not defined
gorocksdb(.text): rocksdb_livefiles_destroy: not defined
gorocksdb(.text): rocksdb_livefiles_largestkey: not defined
gorocksdb(.text): rocksdb_livefiles_level: not defined
gorocksdb(.text): rocksdb_livefiles_name: not defined
gorocksdb(.text): rocksdb_livefiles_size: not defined
too many errors
FAIL gorocksdb [build failed]
Hello,
Unfortunately I cannot build with gorocksdb
after the recent update #124. I take the latest release of rocksdb itself (currently it's 5.9.2
) than I'm trying to go get
gorocksdb's master.
Steps to reproduce:
rocksdb.sh
:#!/bin/bash
set -e
set -x
ROCKSDB_DIR="/tmp/rocksdb"
ROCKSDB_VERSION="v5.9.2"
GOROCKSDB_DIR="${GOPATH}/src/github.com/tecbot/gorocksdb"
# RocksDB: on Ubuntu 16.04
case ${PLATFORM} in
"UBUNTU")
sudo apt-get install \
libsnappy-dev \
zlib1g-dev \
libbz2-dev \
libgflags-dev \
liblz4-dev \
libzstd-dev
;;
"FEDORA")
sudo dnf install \
gflags \
snappy \
snappy-devel \
zlib \
zlib-devel \
bzip2 \
bzip2-devel \
lz4-devel \
libasan \
libzstd \
libzstd-devel
;;
"CENTOS")
sudo yum -y install \
gflags \
snappy \
snappy-devel \
zlib \
zlib-devel \
bzip2 \
bzip2-devel \
lz4-devel \
libasan \
libzstd \
libzstd-devel
;;
*)
echo "Platform is not supported"
exit 1
esac
# Download sources
if [ -d ${ROCKSDB_DIR} ]; then
pushd ${ROCKSDB_DIR}
git pull origin master
else
git clone --depth=1 -b ${ROCKSDB_VERSION} https://github.com/facebook/rocksdb.git ${ROCKSDB_DIR}
pushd ${ROCKSDB_DIR}
fi
# Build project
make clean
make shared_lib -j4
sudo cp --preserve=links ./librocksdb.* /usr/local/lib/
sudo cp -r ./include/rocksdb/ /usr/local/include/
rm -rf ${ROCKSDB_DIR}
popd
# Golang RocksDB bindings
if [ -d ${GOROCKSDB_DIR} ]; then
pushd ${GOROCKSDB_DIR}
git pull origin master
else
git clone --depth=1 https://github.com/tecbot/gorocksdb ${GOROCKSDB_DIR}
fi
rocksdb
:PLATFORM=FEDORA ./rocksdb.sh
gorocksdb
:➜ CGO_CFLAGS="-I/usr/local/include/rocksdb" \
> CGO_LDFLAGS="-L/usr/local/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd" \
> go get github.com/tecbot/gorocksdb
# github.com/tecbot/gorocksdb
../../../github.com/tecbot/gorocksdb/options.go:1045:2: could not determine kind of name for C.rocksdb_options_set_allow_ingest_behind
Please clarify which version of upstream rocksdb
does gorocksdb's master
correspond to.
err msg is: github.com/tecbot/gorocksdb/options.go:328: not enough arguments in call to _Cfunc_rocksdb_options_set_compression_options
rocksdb 4.1 is ok
thanks
Add support for Column Families.
https://github.com/facebook/rocksdb/wiki/Column-Families
xuhuan@ubuntu:~$ go get -tags=embed github.com/tecbot/gorocksdb
# github.com/cockroachdb/c-snappy
g++: error: unrecognized command line option ‘-no-pie’
There's a Free()
method on Slice
.
There's little mention on this in the documentation, so I'm left wondering as to when/whether I should use it.
Intuitively I'd expect it to free the underlying resources in the native library.
Thus:
Free()
, will this cause a memory leak?Free()
?func (iter *Iterator) ValidForPrefix(prefix []byte) bool {
return C.rocksdb_iter_valid(iter.c) != 0 && bytes.HasPrefix(iter.Key().Data(), prefix)
}
The result of iter.Key()
is a *Slice
, which is used but never freed here. Does that have a leak?
In bleve we use gorocksdb with a merge operator. Everything works fine until shutdown/cleanup time when we invoke Destroy() on the options object.
The related bleve issue is here: blevesearch/bleve#332
It comes from this line in gorocksdb: https://github.com/tecbot/gorocksdb/blob/master/options.go#L991
I have looked into this issue on the rocksdb side, and learned that rocksdb_mergeoperator_destroy()
is not intended to be called on a merge operators that have been passed to rocksdb_options_set_merge_operator()
.
You can find a facebook developer stating this in this thread: facebook/rocksdb#343
We've worked around the issue temporarily by skipping Destroy(), but I feel the correct fix is in gorocksdb itself.
These are now supported in RocksDB
Hi,
this could be a bit of a problem for someone who didn't read the source:
Line 287 in 6009289
https://github.com/facebook/rocksdb/blob/master/db/c.cc#L495
:-)
I use the go get -tags=embed github.com/tecbot/gorocksdb to install, how to resolve this ?
root@yuan-sv:/home/yuan# go get -tags=embed github.com/tecbot/gorocksdb
could not determine kind of name for C.rocksdb_options_set_use_direct_io_for_flush_and_compaction
root@yuan-sv:/home/yuan#
[root@localhost gomdb]# go version
go version go1.8 linux/amd64
[root@localhost gomdb]# go test -bench .
--- FAIL: TestTest1 (0.00s)
panic: runtime error: cgo argument has Go pointer to Go pointer [recovered]
panic: runtime error: cgo argument has Go pointer to Go pointer
goroutine 23 [running, locked to thread]:
testing.tRunner.func1(0xc4200789c0)
/usr/local/go/src/testing/testing.go:622 +0x29d
panic(0x543e00, 0xc420070f80)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/szferi/gomdb.(*Txn).Put.func1(0x217ce960, 0xc400000001, 0xc420070f60, 0xc420070f70, 0xc400000010, 0x5)
/home/go-project/src/github.com/szferi/gomdb/txn.go:149 +0x8b
github.com/szferi/gomdb.(*Txn).Put(0xc4200820d8, 0x1, 0xc420070f50, 0x5, 0x8, 0xc420070f58, 0x5, 0x8, 0x10, 0x0, ...)
/home/go-project/src/github.com/szferi/gomdb/txn.go:149 +0xf7
github.com/szferi/gomdb.TestTest1(0xc4200789c0)
/home/go-project/src/github.com/szferi/gomdb/mdb_test.go:52 +0x7ec
testing.tRunner(0xc4200789c0, 0x572d90)
/usr/local/go/src/testing/testing.go:657 +0x96
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:697 +0x2ca
exit status 2
FAIL github.com/szferi/gomdb 0.006s
gorocksdb/compaction_filter.go
Line 30 in b9cb0d3
Below is my log
go get -v -tags=embed github.com/tecbot/gorocksdb
github.com/tecbot/gorocksdb (download)
github.com/cockroachdb/c-lz4 (download)
github.com/cockroachdb/c-rocksdb (download)
github.com/cockroachdb/c-jemalloc (download)
github.com/cockroachdb/c-snappy (download)
github.com/cockroachdb/c-snappy
github.com/cockroachdb/c-lz4
github.com/cockroachdb/c-jemalloc
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/arena.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/arena.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/arena.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
../cockroachdb/c-jemalloc/arena.c:3812:12: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Wdeprecated-declarations]
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
../cockroachdb/c-jemalloc/arena.c:3822:19: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Wdeprecated-declarations]
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
../cockroachdb/c-jemalloc/arena.c:3828:2: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Wdeprecated-declarations]
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/atomic.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/atomic.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/atomic.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/base.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/base.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/base.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/bitmap.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/bitmap.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/bitmap.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/chunk.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/chunk.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/chunk.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/chunk_dss.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/chunk_dss.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/chunk_dss.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/chunk_mmap.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/chunk_mmap.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/chunk_mmap.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/ckh.c:38:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/ckh.c:38:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/ckh.c:38:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/ctl.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/ctl.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/ctl.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/extent.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/extent.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/extent.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/hash.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/hash.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/hash.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/huge.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/huge.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/huge.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/jemalloc.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/jemalloc.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/jemalloc.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/mb.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/mb.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/mb.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/mutex.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/mutex.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/mutex.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/nstime.c:1:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/nstime.c:1:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/nstime.c:1:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/pages.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/pages.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/pages.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/prng.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/prng.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/prng.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/prof.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/prof.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/prof.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/quarantine.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/quarantine.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/quarantine.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/rtree.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/rtree.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/rtree.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/spin.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/spin.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/spin.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/stats.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/stats.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/stats.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/tcache.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/tcache.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/tcache.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/ticker.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/ticker.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/ticker.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/tsd.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/tsd.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/tsd.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/util.c:28:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/util.c:28:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/util.c:28:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
../cockroachdb/c-jemalloc/util.c:62:23: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Wdeprecated-declarations]
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/witness.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/witness.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/witness.c:2:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
# github.com/cockroachdb/c-jemalloc
In file included from ../cockroachdb/c-jemalloc/zone.c:3:
In file included from ../cockroachdb/c-jemalloc/internal/src/zone.c:1:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:420:
internal/include/jemalloc/internal/mutex.h:44:2: warning: 'OSSpinLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:79:17: note: 'OSSpinLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/zone.c:3:
In file included from ../cockroachdb/c-jemalloc/internal/src/zone.c:1:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:99:3: warning: 'OSSpinLockLock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_lock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:99:9: note: 'OSSpinLockLock' has been explicitly marked deprecated here
In file included from ../cockroachdb/c-jemalloc/zone.c:3:
In file included from ../cockroachdb/c-jemalloc/internal/src/zone.c:1:
In file included from darwin_includes/internal/include/jemalloc/internal/jemalloc_internal.h:557:
internal/include/jemalloc/internal/mutex.h:122:3: warning: 'OSSpinLockUnlock' is deprecated: first deprecated in macOS 10.12 - Use os_unfair_lock_unlock() from <os/lock.h> instead [-Wdeprecated-declarations]
/usr/include/libkern/OSSpinLockDeprecated.h:105:9: note: 'OSSpinLockUnlock' has been explicitly marked deprecated here
github.com/cockroachdb/c-rocksdb
github.com/tecbot/gorocksdb
I attempted to update an existing key, but the new value is based on the old. For example
get foo
returns 10
put foo
= 10 + 5
between the operation of get
and put
, the value of foo
may have been modified by other operation. How to solove that?
thanks!
My contractor gave me some time to test and integrate RocksDB with go etc.
Just for those interested in and playing with optimization:
I added some functions for the iterator which assume to reduce cgo calls, for example: NextValidKeyValue(), which calls a c function that calls the iterator`s next and if valid returns the key and value:
iter.SeekToFirst()
for valid, skey, sval := iter.ValidKeyValue(); valid; valid, skey, sval = iter.NextValidKeyValue() {}
Results:
Original implementation:
(pprof) top 30
20.96s of 21.80s total (96.15%)
Dropped 94 nodes (cum <= 0.11s)
Showing top 30 nodes out of 46 (cum >= 0.16s)
flat flat% sum% cum cum%
12.89s 59.13% 59.13% 13.85s 63.53% runtime.cgocall
2.27s 10.41% 69.54% 3.86s 17.71% runtime.mallocgc
0.96s 4.40% 73.94% 0.96s 4.40% runtime.heapBitsSetType
0.60s 2.75% 76.70% 1.01s 4.63% runtime.cgoIsGoPointer
0.49s 2.25% 78.94% 4.35s 19.95% runtime.newobject
Iterator extension:
(pprof) top 30
17.37s of 18.15s total (95.70%)
Dropped 77 nodes (cum <= 0.09s)
Showing top 30 nodes out of 46 (cum >= 0.24s)
flat flat% sum% cum cum%
7.20s 39.67% 39.67% 7.55s 41.60% runtime.cgocall
4.50s 24.79% 64.46% 5.99s 33.00% runtime.mallocgc
0.83s 4.57% 69.04% 0.83s 4.57% runtime.heapBitsSetType
0.72s 3.97% 73.00% 0.90s 4.96% runtime.cgoIsGoPointer
0.68s 3.75% 76.75% 17.19s 94.71% github.com/kapitan-k/gorocksdborig.(*Iterator).NextValidKeyValue
Not that of an advantage.
Iterator and tests can be found in my fork:
https://github.com/kapitan-k/gorocksdb/tree/iterator_perf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.