Skip to content

refactor: Remove exposing schema() for NeugDBSession#569

Merged
zhanglei1949 merged 1 commit into
alibaba:mainfrom
zhanglei1949:zl/rm-schema-getter-sess
Jun 23, 2026
Merged

refactor: Remove exposing schema() for NeugDBSession#569
zhanglei1949 merged 1 commit into
alibaba:mainfrom
zhanglei1949:zl/rm-schema-getter-sess

Conversation

@zhanglei1949

Copy link
Copy Markdown
Member

Fix #567

@zhanglei1949 zhanglei1949 requested review from Copilot and liulx20 June 17, 2026 10:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR refactors schema access to stop exposing schema() on NeugDBSession, instead obtaining schema via transactions (and adds ReadTransaction::schema() to support read-mode execution).

Changes:

  • Removed NeugDBSession::schema() from the public API and updated server execution to pass txn.schema() into pipeline execution.
  • Added ReadTransaction::schema() to support schema access during read transactions.
  • Updated transaction tests to fetch label IDs via txn.schema() rather than via session/db schema accessors.

Reviewed changes

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

Show a summary per file
File Description
tests/transaction/test_acid.cc Updates tests to use txn.schema() for label/edge IDs; adjusts init flows accordingly.
src/transaction/read_transaction.cc Implements ReadTransaction::schema() for read-mode schema retrieval.
src/server/neug_db_session.cc Switches query execution to use per-transaction schema access; removes reliance on session schema.
include/neug/transaction/read_transaction.h Exposes ReadTransaction::schema() in the public header.
include/neug/server/neug_db_session.h Removes schema() from NeugDBSession interface and drops Schema fwd declaration.

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

Comment thread tests/transaction/test_acid.cc
Comment thread include/neug/transaction/read_transaction.h
liulx20
liulx20 previously approved these changes Jun 22, 2026
@zhanglei1949 zhanglei1949 force-pushed the zl/rm-schema-getter-sess branch from 5476f65 to f18ef92 Compare June 23, 2026 00:23
@zhanglei1949 zhanglei1949 merged commit 8df426c into alibaba:main Jun 23, 2026
22 checks passed
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.

[BUG] NeugDBSession should not expose schema() interface

3 participants