Skip to content

refactor: wrap VertexTable::indexer_ and v_ts_ as std::shared_ptr#391

Merged
zhanglei1949 merged 2 commits into
alibaba:mainfrom
zhanglei1949:zl/vertex-table-shared-ptr
May 22, 2026
Merged

refactor: wrap VertexTable::indexer_ and v_ts_ as std::shared_ptr#391
zhanglei1949 merged 2 commits into
alibaba:mainfrom
zhanglei1949:zl/vertex-table-shared-ptr

Conversation

@zhanglei1949
Copy link
Copy Markdown
Member

Fix #390

Copy link
Copy Markdown
Contributor

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 prepares VertexTable for upcoming copy-on-write snapshotting by wrapping the internal indexer_ and v_ts_ members in std::shared_ptr, enabling future use_count()-based “is shared?” checks while keeping the external API (reference-returning accessors) unchanged.

Changes:

  • Refactor VertexTable::indexer_ and VertexTable::v_ts_ to std::shared_ptr and update member access from . to ->.
  • Update construction/move/swap paths to manage the new pointer-wrapped members.
  • Adjust VertexSet creation and timestamp/indexer accessors to dereference internally, preserving existing public signatures.

Reviewed changes

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

File Description
include/neug/storages/graph/vertex_table.h Wraps indexer_/v_ts_ in shared_ptr, updates constructor/move/Swap and inline helpers to dereference internally.
src/storages/graph/vertex_table.cc Updates runtime operations (Open, Dump, Close, CRUD, capacity mgmt) to use pointer access; modifies Drop() cleanup logic.

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

Comment thread src/storages/graph/vertex_table.cc
Comment thread src/storages/graph/vertex_table.cc
@zhanglei1949 zhanglei1949 merged commit 01b67c8 into alibaba:main May 22, 2026
18 checks passed
@lnfjpt lnfjpt mentioned this pull request May 26, 2026
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.

Refactor: wrap VertexTable::indexer_ and v_ts_ as std::shared_ptr

3 participants