Skip to content

Commit b0a8a69

Browse files
committed
Allow Longer keys upto 600 chars
Motivation: Earlier we were conservative about our key-size since it is easier to increase but difficult to increase in backward compatible fashion. Now with introduction of sub_namespace and directly allowing upto 360char keys in LDK, we need support for longer key lengths. * We use varchar over text as it is sql standard and can be indexed in all sql-implementations while limiting key size. * LDK can have keys of length up to 362(120*3+2), we use 600 as a safe limit with some buffer and considering applications other than LDK.
1 parent 8972816 commit b0a8a69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CREATE TABLE vss_db (
22
store_id character varying(120) NOT NULL CHECK (store_id <> ''),
3-
key character varying(120) NOT NULL,
3+
key character varying(600) NOT NULL,
44
value bytea NULL,
55
version bigint NOT NULL,
66
PRIMARY KEY (store_id, key)

0 commit comments

Comments
 (0)