Skip to content

Cleanup existing metadata#418

Open
adespawn wants to merge 4 commits intoscylladb:mainfrom
adespawn:cleanup-existing-metadata
Open

Cleanup existing metadata#418
adespawn wants to merge 4 commits intoscylladb:mainfrom
adespawn:cleanup-existing-metadata

Conversation

@adespawn
Copy link
Contributor

@adespawn adespawn commented Mar 20, 2026

This PR is a second part of new metadata implementation.

The goal of this PR is to remove existing DSx logic inside Metadata class, which we will not use, so that we can better understand the changes to the API we will introduce in the following PRs

Refs: #268, #261

Refactors were made with use of LLMs

This removes all internals of metadata classes, leaving only the public API
without any implementation. This simplification is done,
to better understand changes to the public API that will be done in
the following commits.
This was a metadata specific to DSx service
The plan is to let the rust driver handle all metadata fetching.
This means we will be able to retrieve all the metadata in a sync way.
This commit updates the metadata class API to expose all endpoints in a
sync way.

This is meant to split the API changes into smaller parts,
to better understand the differences between the old and new API.
This is a no longer used part of the code that wasn't exposed in the public API
@adespawn adespawn self-assigned this Mar 20, 2026
@adespawn adespawn requested a review from Copilot March 20, 2026 11:06
@adespawn adespawn added this to the 0.5.0 milestone Mar 20, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the legacy DataStax-style (DSx) metadata implementation pieces to simplify the codebase ahead of upcoming metadata API work.

Changes:

  • Removed the legacy schema parsing implementation (schema-parser.js) and its related unit coverage.
  • Removed the metadata event debouncer implementation and its tests.
  • Replaced many Metadata behaviors with placeholder TODO throws.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/unit-not-supported/event-debouncer-tests.js Deleted tests for the removed event debouncer.
test/unit-broken/metadata-tests.js Removed tests that depended on the deleted schema parser helper.
lib/metadata/schema-parser.js Deleted legacy schema parsing implementation.
lib/metadata/index.js Stripped most metadata functionality; many methods now throw TODO: Not implemented.
lib/metadata/event-debouncer.js Deleted event debouncer implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adespawn adespawn requested a review from wprzytula March 20, 2026 11:16
* If a `callback` is provided, the callback is invoked when the keyspace metadata refresh completes.
* Otherwise, it returns a `Promise`.
* @param {Boolean|Function} [waitReconnect] Determines if it should wait for reconnection in case the control connection is not
* @param {Boolean} [waitReconnect] Determines if it should wait for reconnection in case the control connection is not
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Why was this Boolean|Function???

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Someone could skip waitReconect argument and provide just callback.

Totally JS thing to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants