Skip to content

Conversation

@fenos
Copy link
Contributor

@fenos fenos commented Oct 3, 2025

What kind of change does this PR introduce?

Feature

What is the new behaviour?

Implement Vector Bucket data source

Supported Operations:

  • CreateIndex
  • DeleteIndex
  • GetIndex
  • ListIndexes
  • PutVectors
  • ListVectors
  • ListVectorBuckets
  • QueryVectors
  • DeleteVectors
  • GetVectorBucket
  • GetVectors

Authentication mechanisms:

  • SignV4
  • JWT service_role

Sharding

  • Implemented sharding for resources which span in multiple underlying buckets (vector indexes)

Analytics Buckets

  • Fixed issue when committing an iceberg transaction when using big transaction numbers
  • Added specific endpoints for managing analytics buckets

@snyk-io
Copy link

snyk-io bot commented Oct 3, 2025

Snyk checks have failed. 8 issues have been found so far.

Status Scanner Critical High Medium Low Total (8)
Code Security 0 8 0 0 8 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@fenos fenos force-pushed the feat/vector-buckets branch 6 times, most recently from 01797cc to a2715e7 Compare October 10, 2025 11:12
@coveralls
Copy link

coveralls commented Oct 10, 2025

Pull Request Test Coverage Report for Build 19099986462

Details

  • 3428 of 3935 (87.12%) changed or added relevant lines in 58 files are covered.
  • 31 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+1.4%) to 77.75%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/http/plugins/jwt.ts 3 5 60.0%
src/http/routes/vector/create-bucket.ts 43 45 95.56%
src/http/routes/vector/create-index.ts 64 66 96.97%
src/http/routes/vector/delete-bucket.ts 43 45 95.56%
src/http/routes/vector/delete-index.ts 51 53 96.23%
src/http/routes/vector/delete-vectors.ts 48 50 96.0%
src/http/routes/vector/get-bucket.ts 43 45 95.56%
src/http/routes/vector/get-index.ts 62 64 96.88%
src/http/routes/vector/get-vectors.ts 47 49 95.92%
src/http/routes/vector/list-buckets.ts 44 46 95.65%
Files with Coverage Reduction New Missed Lines %
src/http/plugins/signature-v4.ts 1 46.09%
src/internal/database/tenant.ts 2 83.65%
src/storage/protocols/s3/signature-v4.ts 28 73.82%
Totals Coverage Status
Change from base Build 19066718465: 1.4%
Covered Lines: 24588
Relevant Lines: 31299

💛 - Coveralls

@fenos fenos force-pushed the feat/vector-buckets branch from a2715e7 to 6bf5f59 Compare October 13, 2025 09:35
@fenos fenos force-pushed the feat/vector-buckets branch from 6bf5f59 to f2ae953 Compare October 17, 2025 09:33
@fenos fenos force-pushed the feat/vector-buckets branch 9 times, most recently from 2059ee5 to 2e888a1 Compare November 4, 2025 12:44
@fenos fenos force-pushed the feat/vector-buckets branch 2 times, most recently from b7a491e to 528b466 Compare November 5, 2025 10:38
@fenos fenos enabled auto-merge (squash) November 5, 2025 11:00
@fenos fenos force-pushed the feat/vector-buckets branch from 528b466 to cf989fd Compare November 5, 2025 11:06
@fenos fenos force-pushed the feat/vector-buckets branch from cf989fd to a879634 Compare November 5, 2025 11:08
},
// allow arbitrary additional args specific to the requirement
ref: { type: 'string' },
// 'snapshot-id': { type: 'number', format: 'int64', bigint: true },
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be added/uncommented in the future? Otherwise remove this line.

// format: 'int64',
// bigint: true,
// nullable: true,
// },
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

try {
if (typeof payload === 'string') return done(null, JSONBigint.parse(payload))
if (Buffer.isBuffer(payload)) return done(null, JSONBigint.parse(payload.toString('utf8')))
if (payload && typeof (payload as any).on === 'function') {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is kinda icky... maybe replace with a type guard

function isReadableStream(obj: unknown): obj is NodeJS.ReadableStream {
  return (
    obj != null &&
    typeof obj === 'object' &&
    typeof (obj as NodeJS.ReadableStream).on === 'function'
  )
}

Then you can do this and remove the as NodeJS.ReadableStream

if (isReadableStream(payload)) {
  // ...
}

getConfig()

// Sharding for special buckets (vectors, analytics)
const sharding = new ShardCatalog(new KnexShardStoreFactory(multitenantKnex))
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be inside the isMultitenant if block?

// headers: response.request.headers,
// })
return response.data
})
Copy link
Contributor

Choose a reason for hiding this comment

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

revert debug code

// req.data ? ` \\\n -d '${JSON.stringify(req.data)}'` : ''
// }
// `.trim()
// )
Copy link
Contributor

Choose a reason for hiding this comment

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

remove debug code

@fenos fenos merged commit 6ba23e4 into master Nov 5, 2025
1 of 2 checks passed
@fenos fenos deleted the feat/vector-buckets branch November 5, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants