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
{{ message }}
Repository navigation
INSERT INTO A BUCKET b / CREATE VERTEX A BUCKET b accepts a bucket that belongs to no type: the record skips A's UNIQUE index, is invisible to SELECT FROM A, reads back with @type null and can never be updated #12959
INSERT INTO A BUCKET b ... and CREATE VERTEX A BUCKET b ... (and the Java API newDocument("A")...save("b")) refuse a bucket that belongs to another type (#11206: "Cannot create a record of type 'A' in bucket 'B_0', which belongs to type 'B'"). A bucket that belongs to no type is accepted, though. The record is then reported back as an A but is not one:
it skips A's indexes, so a UNIQUE key already taken in A is accepted, twice;
SELECT FROM A, SELECT FROM A WHERE k = 9 and MATCH (n:A) do not see it;
reading the bucket shows @type: null;
it can never be modified afterwards: UPDATE bucket:loose ... answers "Cannot modify vertex Bump icu4j from 68.2 to 69.1 #8:0: bucket 'loose' belongs to no type. Attach it to a type with ALTER TYPE ... BUCKET +";
ALTER TYPE A BUCKET +loose is then refused too, because of the duplicate keys the first point let in.
CREATE VERTEX TYPE A; CREATE PROPERTY A.k INTEGER; CREATE INDEX ON A (k) UNIQUE
CREATE VERTEX TYPE B; CREATE BUCKET loose
INSERT INTO A SET k = 1 -> 200 #1:0
INSERT INTO A BUCKET B_0 SET k = 2 -> 400 Cannot create a record of type 'A' in bucket 'B_0', which belongs to type 'B'
INSERT INTO A BUCKET loose SET k = 1 -> 200 {"@rid": "#8:0", "@type": "A", "k": 1} (duplicate of #1:0's key)
INSERT INTO A BUCKET loose SET k = 1 -> 200 #8:1 (and again)
CREATE VERTEX A BUCKET loose SET k = 9 -> 200 #8:2
SELECT count(*) FROM A -> 1
SELECT FROM A WHERE k = 9 -> []
SELECT @rid, @type, k FROM bucket:loose -> three rows, "@type": null
UPDATE bucket:loose SET k = 10 -> 400 Cannot modify vertex #8:0: bucket 'loose' belongs to no type ...
ALTER TYPE A BUCKET +loose -> 409 Duplicated key [1] found on index 'loose_...'
Repro: insert_into_typeless_bucket.py (stdlib only; creates insert_into_typeless_bucket_repro). Main 8da9049d98.
Cause
LocalDatabase.createRecordNoLock (around line 1550) checks the bucket owner with if (owner != null && !owner.getName().equals(doc.getTypeName())). A null owner falls through, so the record is written into a bucket no type reads.
Expected
Refuse it like the other-type case. For example: "Cannot create a record of type 'A' in bucket 'loose', which belongs to no type: attach it first with ALTER TYPE A BUCKET +loose". That is the same remedy the update refusal already names. INSERT INTO bucket:loose SET ... without a type is already refused ("Record type is not specified").
INSERT INTO A BUCKET x, CREATE VERTEX A BUCKET x, INSERT INTO BUCKET:x FROM SELECT ..., MOVE VERTEX ... TO BUCKET:x and the Java API save("x") used to accept a bucket that belongs to no type. The record was reported as an A but skipped A's indexes (a UNIQUE key could be taken twice), was invisible to SELECT FROM A and MATCH, and could not be updated afterwards.
Such a write is now refused, like writing into a bucket owned by another type:
Cannot create a record of type 'A' in bucket 'loose', which belongs to no type: attach it first with ALTER TYPE A BUCKET +loose``
Attach the bucket to the type first and the write works. A refused MOVE VERTEX leaves the vertex where it was. Records already written into such a bucket before the upgrade are not touched.
Nothing is left open.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Activity
fix(ArcadeData#12959): an internal bucket is refused as internal, bef…
fix(#12959): a record of a type cannot be created in a bucket that be…
robfrank commentedon Nov 22, 2026
Fixed by #12964, shipping in 26.12.1.
INSERT INTO A BUCKET x,CREATE VERTEX A BUCKET x,INSERT INTO BUCKET:x FROM SELECT ...,MOVE VERTEX ... TO BUCKET:xand the Java APIsave("x")used to accept a bucket that belongs to no type. The record was reported as anAbut skippedA's indexes (a UNIQUE key could be taken twice), was invisible toSELECT FROM AandMATCH, and could not be updated afterwards.Such a write is now refused, like writing into a bucket owned by another type:
Cannot create a record of type 'A' in bucket 'loose', which belongs to no type: attach it first with ALTER TYPEABUCKET +loose``Attach the bucket to the type first and the write works. A refused
MOVE VERTEXleaves the vertex where it was. Records already written into such a bucket before the upgrade are not touched.Nothing is left open.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.