mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-10 13:58:24 +01:00
* vector: expose request metrics and registration-aware health endpoints * vector: report immutable read cache and storage fetch metrics * docs: describe vector engine health, metrics, and maintenance * vector: count canceled requests when their handler is dropped * vector: account for uncached large immutable storage reads * vector: reliably release the stalled credential reader in tests * vector: observe large reads as their streamed body is consumed * vector: bound heartbeats on established master registration streams * test: exercise hardened vector maintenance on Go and Rust volumes * vector: register engines in their configured filer group * vector: make retried index creation preserve compatible datasets * vector: allow registration to advertise a separate address * test: release stalled credential readers without blocking FIFO cleanup * test: allow hardened vector coverage in a named filer group * vector: discover engines in the same filer group as their gateway * vector: fall back when the advertised address is empty * admin: expose vector readiness, maintenance, and management tools (#12520) * s3vectors: share vector discovery with trusted management clients * admin: show vector engine readiness and recent maintenance activity * admin: suggest S3 Vectors IAM actions from the supported operations * admin: manage vector indexes, policies, tags, encryption, and query data * admin: validate SSE-S3 support before creating encrypted vector buckets * admin: discover vector engines in their registration group * admin: probe vector engines concurrently with independent time budgets * admin: verify encryption capability on the remote S3 gateway * admin: defer discovery until after the HTTP server can start * admin: distinguish unknown vector health services from failed engines * admin: count workers that can execute vector index maintenance * admin: allow read-only users to query vectors and inspect tags * vector: scope gateway and admin discovery to the configured filer group * admin: refresh policy state after mutations and serialize policy controls * vector: drain active RPCs before closing replaced discovery connections * vector: respect request cancellation while waiting for discovery * vector: prefer another registered engine after a transport failure * admin: check all masters before reporting no registered vector engines * iam: honor attached vector policies without broadening legacy grants * vector: allow short-lived discovery clients to close their connections * vector: refresh cached master addresses for each discovery lookup * iam: enforce vector bucket tag conditions in attached policies * iam: authorize vector bucket creation with the requested tags * test: exercise vector IAM grants and tag denies on Go and Rust volumes * admin: reject authenticated vector mutations without an admin role * test: run vector IAM assertions before the shared engine is stopped * vector: add native mini startup, shell tools, and a runnable Compose example (#12522) * s3vectors: share vector discovery with trusted management clients * admin: show vector engine readiness and recent maintenance activity * admin: suggest S3 Vectors IAM actions from the supported operations * admin: manage vector indexes, policies, tags, encryption, and query data * admin: validate SSE-S3 support before creating encrypted vector buckets * admin: discover vector engines in their registration group * admin: probe vector engines concurrently with independent time budgets * admin: verify encryption capability on the remote S3 gateway * admin: defer discovery until after the HTTP server can start * admin: distinguish unknown vector health services from failed engines * admin: count workers that can execute vector index maintenance * admin: allow read-only users to query vectors and inspect tags * vector: scope gateway and admin discovery to the configured filer group * admin: refresh policy state after mutations and serialize policy controls * vector: drain active RPCs before closing replaced discovery connections * vector: respect request cancellation while waiting for discovery * vector: prefer another registered engine after a transport failure * admin: check all masters before reporting no registered vector engines * iam: honor attached vector policies without broadening legacy grants * vector: allow short-lived discovery clients to close their connections * vector: refresh cached master addresses for each discovery lookup * iam: enforce vector bucket tag conditions in attached policies * iam: authorize vector bucket creation with the requested tags * test: exercise vector IAM grants and tag denies on Go and Rust volumes * admin: reject authenticated vector mutations without an admin role * test: run vector IAM assertions before the shared engine is stopped * mini: optionally start and supervise the vector engine * mini: bootstrap vector buckets with existing Lance catalog helpers * shell: manage vector buckets, indexes, and vector data * docs: provide a runnable vector and maintenance worker Compose stack * shell: scope vector discovery to the session and close its connections * mini: honor the bind address for vector and metrics listeners * mini: reserve vector ports before assigning gRPC and compatibility listeners * mini: wait for vector storage setup and master registration * mini: create requested vector buckets without requiring the Lance HTTP listener * shell: refresh master addresses during vector discovery * mini: resolve sibling vector executables with platform extensions * vector: preserve uncertain creates and fix mini listener allocation (#12525) * vector: retain catalog records when index creation has an unknown outcome * mini: keep chosen listener ports reserved throughout allocation * mini: resolve hostname binds before starting vector listeners * vector: fix integration test imports and recover interrupted index creation (#12533) * shell: register vector operations from the command package * s3vectors: resume interrupted index initialization safely * mini: exclude disabled WebDAV from listener allocation * s3vectors: retain uncertain creates across refused retries * s3vectors: claim pending indexes before retrying initialization * s3vectors: compare resolved distance metrics during recovery * s3vectors: preserve metadata keys when retrying initialization * s3vectors: verify ownership before initializing new catalog records
86 lines
5.2 KiB
Templ
86 lines
5.2 KiB
Templ
package app
|
|
|
|
|
|
templ VectorTools(bucket, arn, policy string) {
|
|
<div class="card shadow mb-4" id="vectorTools" data-bucket={ bucket } data-arn={ arn }>
|
|
<div class="card-header">Manage Indexes, Policies and Vectors</div>
|
|
<div class="card-body">
|
|
<form id="vectorIndexForm" class="row g-2 mb-3">
|
|
<div class="col"><label for="vectorIndexName" class="form-label">Index name</label><input id="vectorIndexName" class="form-control" required/></div>
|
|
<div class="col"><label for="vectorDimension" class="form-label">Dimension</label><input id="vectorDimension" class="form-control" type="number" min="1" max="4096" required/></div>
|
|
<div class="col"><label for="vectorDistance" class="form-label">Distance</label><select id="vectorDistance" class="form-select"><option value="cosine">Cosine</option><option value="euclidean">Euclidean</option></select></div>
|
|
<div class="col-auto align-self-end"><button class="btn btn-primary" type="submit">Create Index</button></div>
|
|
</form>
|
|
<form id="vectorPolicyForm" class="mb-3">
|
|
<label for="vectorPolicy" class="form-label">Bucket policy</label><textarea id="vectorPolicy" class="form-control font-monospace" rows="5">{ policy }</textarea>
|
|
<button class="btn btn-outline-primary mt-2" type="submit">Save Policy</button>
|
|
<button class="btn btn-outline-danger mt-2" type="button" id="vectorDeletePolicy">Delete Policy</button>
|
|
</form>
|
|
<form id="vectorOperationForm">
|
|
<label for="vectorOperation" class="form-label">Vector and tagging operations</label>
|
|
<select id="vectorOperation" class="form-select mb-2">
|
|
<option>QueryVectors</option><option>PutVectors</option><option>GetVectors</option><option>ListVectors</option><option>DeleteVectors</option><option>ListTagsForResource</option><option>TagResource</option><option>UntagResource</option>
|
|
</select>
|
|
<label for="vectorRequest" class="form-label">Request JSON</label><textarea id="vectorRequest" class="form-control font-monospace" rows="7" required></textarea>
|
|
<button class="btn btn-outline-primary mt-2" type="submit">Run</button>
|
|
</form>
|
|
<pre id="vectorResult" class="mt-3 mb-0" role="status"></pre>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const root = document.getElementById('vectorTools');
|
|
const bucket = root.dataset.bucket;
|
|
const output = document.getElementById('vectorResult');
|
|
const run = async (operation, request) => {
|
|
output.textContent = 'Running…';
|
|
const response = await fetch(s3tBasePath('/api/s3vectors/operations'), {method:'POST', headers:s3tWriteHeaders({'Content-Type':'application/json'}), body:JSON.stringify({operation,request})});
|
|
const result = await response.json();
|
|
output.textContent = JSON.stringify(result,null,2);
|
|
if (!response.ok) throw new Error(result.error || 'Operation failed');
|
|
return result;
|
|
};
|
|
const submit = (id, action) => document.getElementById(id).addEventListener('submit', async event => {
|
|
event.preventDefault();
|
|
const buttons = event.target.querySelectorAll('button');
|
|
buttons.forEach(button => button.disabled = true);
|
|
try { await action(); } catch(error) {output.textContent=error.message;} finally {buttons.forEach(button => button.disabled = false);}
|
|
});
|
|
submit('vectorIndexForm', async () => {
|
|
await run('CreateIndex',{vectorBucketName:bucket,indexName:document.getElementById('vectorIndexName').value,dimension:Number(document.getElementById('vectorDimension').value),distanceMetric:document.getElementById('vectorDistance').value,dataType:'float32'});
|
|
location.reload();
|
|
});
|
|
submit('vectorPolicyForm', async () => {
|
|
const policy=document.getElementById('vectorPolicy').value;
|
|
JSON.parse(policy);
|
|
await run('PutVectorBucketPolicy',{vectorBucketName:bucket,policy});
|
|
location.reload();
|
|
});
|
|
document.getElementById('vectorDeletePolicy').addEventListener('click',async () => {
|
|
if (!confirm('Delete this bucket policy?')) return;
|
|
const controls=document.getElementById('vectorPolicyForm').querySelectorAll('button,textarea');
|
|
controls.forEach(control => control.disabled=true);
|
|
try {await run('DeleteVectorBucketPolicy',{vectorBucketName:bucket});location.reload();} catch(error) {output.textContent=error.message;} finally {controls.forEach(control => control.disabled=false);}
|
|
});
|
|
const operation=document.getElementById('vectorOperation');
|
|
const request=document.getElementById('vectorRequest');
|
|
const example=() => {
|
|
const op=operation.value;
|
|
let value={vectorBucketName:bucket,indexName:document.getElementById('vectorIndexName').value || 'my-index'};
|
|
if (op==='QueryVectors') Object.assign(value,{queryVector:{float32:[0.1,0.2,0.3]},topK:5,returnDistance:true});
|
|
if (op==='PutVectors') value.vectors=[{key:'example',data:{float32:[0.1,0.2,0.3]}}];
|
|
if (op==='GetVectors' || op==='DeleteVectors') value.keys=['example'];
|
|
if (op.includes('Tag') || op==='UntagResource') {
|
|
value={resourceArn:root.dataset.arn};
|
|
if (op==='TagResource') value.tags={environment:'development'};
|
|
if (op==='UntagResource') value.tagKeys=['environment'];
|
|
}
|
|
request.value=JSON.stringify(value,null,2);
|
|
};
|
|
operation.addEventListener('change',example);
|
|
example();
|
|
submit('vectorOperationForm',()=>run(operation.value,JSON.parse(request.value)));
|
|
});
|
|
</script>
|
|
}
|