Comments (3)
Hi @aaronyuan
Yes, it's safe to use since the key is only GC-ed when run out of scope.
from grocksdb.
Hi @linxGnu
C.rocksdb_get(db.c, opts.c, cKey, C.size_t(len(key)), &cValLen, &cErr)
Does calling into C go beyond the scope of Go?
from grocksdb.
Here is the signature of rocksdb_get:
extern ROCKSDB_LIBRARY_API char* rocksdb_get(
rocksdb_t* db, const rocksdb_readoptions_t* options, const char* key,
size_t keylen, size_t* vallen, char** errptr);
const char* means: key is immutable. After returning, RocksDB will not keep reference to the key. And again, the key is only GC-ed when run out of scope -> Safe!
from grocksdb.
Related Issues (20)
- no ability to set track_and_verify_wals_in_manifest option HOT 1
- support a non-hacky way to override link flags HOT 3
- failed to compile: library not found for -lsnappy HOT 3
- ld: library not found for -lrocksdb HOT 2
- installed latest rocksdb HOT 1
- Include library files in repository HOT 1
- no dboption delayed_write_rate HOT 1
- `options.SetPrefixExtractor(grocksdb.NewNoopPrefixTransform())` maybe coredump HOT 2
- Documentation improvments: When should Destroy be called for db option types ? HOT 1
- Error: Library Not Found HOT 12
- Is it possible to implement CompactFiles ? HOT 1
- (*WriteBatchIterator).decodeVarint unfortunately doesnโt correctly detect invalid varint sequences and can consume the entire buffer HOT 1
- Incorrect binding for MultiGetWithCF HOT 4
- Help for dummies? ./cache.go:25:12: could not determine kind of name for C.rocksdb_cache_create_hyper_clock HOT 1
- crash when using column families HOT 2
- Is there possible using this without installing rocksdb? HOT 1
- librocksdb.so.8 not found when using CGO_LDFLAGS
- could not determine kind of name for C.rocksdb_options_get_access_hint_on_compaction_start
- need rocksdb_column_family_handle_get_name HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grocksdb.