ydb filer store by kmlebedev · Pull Request #2996 · seaweedfs/seaweedfs

2 min read Original article ↗
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

# Conflicts:
#	go.mod
#	go.sum

@kmlebedev kmlebedev marked this pull request as ready for review

May 2, 2022 19:21

@kmlebedev

@kmlebedev

chrislusf

@chrislusf

you may need to add one empty file to the ydb folder, to ensure compilation when "ydb" tag is not defined.

@kmlebedev

you may need to add one empty file to the ydb folder, to ensure compilation when "ydb" tag is not defined.

done

rekby

var name string
var data []byte
for res.NextResultSet(ctx) {
for res.NextRow() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YDB has limit for return rows (default - 1000).
The client code must check Truncated() flag to detect if response truncated (and select next page/return error).

res.CurrentResultSet().Truncated()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rekby How to get this page if the request already has a limit and a start name ?
Perhaps there are regular means without changing the select query ?

		SELECT name, meta
		FROM filemeta
		WHERE dir_hash = $dir_hash AND directory = $directory and name >= $start_name and name LIKE $prefix
		ORDER BY name ASC LIMIT $limit;`

@chrislusf

Please add some tests similar to weed/filer/etcd/etcd_store_test.go in d5fe5d1

kmlebedev added a commit to kmlebedev/seaweedfs that referenced this pull request

May 11, 2022

kmlebedev added a commit to kmlebedev/seaweedfs that referenced this pull request

May 12, 2022

@kmlebedev

add some tests

done #3043