You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func PmdbWriteKV(app_id unsafe.Pointer, pmdb_handle unsafe.Pointer, key string, key_len int64,
value string, value_len int64, gocolfamily string) int {
Can we not simply use PumiceDBServer.PmdbCbArgs instead of the first 2 parameters? This would reduce the parameter list and prevent the passing of 2 unsafe.Pointers.
// Put queues a key-value pair.
func (wb *WriteBatch) Put(key, value []byte) {
cKey := refGoBytes(key)
cValue := refGoBytes(value)
C.rocksdb_writebatch_put(wb.c, cKey, C.size_t(len(key)), cValue, C.size_t(len(value)))
}
On the read side, PmdbReadKV() and friends (including LookupKey()) should use PumiceDBServer.PmdbCbArgs instead of unsafe.Pointer and []byte instead of string.
00pauln00
changed the title
PmdbWriteKV() and WriteKV() Parameters Need Improvements
PmdbWriteKV(), WriteKV(), PmdbLookupKey(), PmdbReadKV() & ReadKV() -- Parameters Need Improvements
Dec 19, 2023
PumiceDBServer.PmdbCbArgs
instead of the first 2 parameters? This would reduce the parameter list and prevent the passing of 2unsafe.Pointer
s.key
andvalue
need to be of type[]byte
.Here's an example from https://github.com/linxGnu/grocksdb/blob/master/write_batch.go
On the read side,
PmdbReadKV()
and friends (includingLookupKey()
) should usePumiceDBServer.PmdbCbArgs
instead of unsafe.Pointer and[]byte
instead ofstring
.niova-pumicedb/go/pumiceDB/server/PumiceDBServer.go
Line 391 in 3c0456d
The text was updated successfully, but these errors were encountered: