-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hey, just wanted to share my findings and to save time for others.
Not sure if it is a known issue or not, but looks like many-level is not compatible with abstract-level v3 databases and only supports v1. I was able to find it out by downgrading memory-level version from 3.x.x to 1.x.x.
Here is code snippet I was using for testing (original file https://github.com/Level/many-level/blob/main/test/basic.js):
import { MemoryLevel } from 'memory-level'
import { ManyLevelHost, ManyLevelGuest } from './index.js'
const db = new MemoryLevel()
const host = new ManyLevelHost(db)
const stream = host.createRpcStream()
const guest = new ManyLevelGuest()
stream.pipe(guest.createRpcStream()).pipe(stream)
db.put('hello', 'world', function (err) {
guest.get('hello', function (err, value) {
console.log('value', value)
})
guest.get(Buffer.from('hello'), function (err, value) {
console.log('value', value)
})
guest.get('hello', { valueEncoding: 'buffer' }, function (err, value) {
console.log('value', value)
})
})Turned out db.put callback was never being called, probably due to migration to async / awaits in later versions AL versions: https://github.com/Level/abstract-level/blob/main/CHANGELOG.md#200---2024-02-03.
For the record, I was testing it with nodejs version v25.2.1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels