Skip to content

INTERNAL: Run search, insert, replace and delete on the lanes - #23

Merged
ing-eoking merged 1 commit into
developfrom
lane-ops
Nov 13, 2026
Merged

ing-eoking merged 1 commit into
developfrom
lane-ops

Conversation

@ing-eoking

Copy link
Copy Markdown
Collaborator

🔗 Related Issue

⌨️ What I did

lane이 받은 Op을 실제로 Graph에 실행합니다.
이전 PR까지는 lane이 모든 Op에 NOT_SUPPORTED로 답했고, 이번 PR부터 search·insert·replace·delete·create·drop을 처리합니다.

인덱스는 맵 link 이벤트로만 만들어집니다. 그래서 로컬 생성·복제·재생이 같은 경로로 처리됩니다.

맵 link 이벤트
  op_of: 맵 value에 "type": "vector"가 없으면 → 무시 (일반 맵)
  lane: create_with(이름, value)
          필드가 깨졌으면 → TYPE_MISMATCH
          이미 있으면 → EXISTS

설정 BSON 형식:

{ "type": "vector", "dim", "metric", "quant", "M", "efc", "efs" }
  • "type": "vector" 표시로 벡터 인덱스 맵과 일반 맵을 구분합니다.
    표시가 없는 맵은 이벤트 콜백에서 바로 끝나므로, value를 복사하지도 lane에 넘기지도 않습니다.
  • vop create는 아직 맵을 저장하지 않으므로 이번 PR에서는 NOT_SUPPORTED를 돌려줍니다.
    create_map으로 설정을 저장하도록 바뀌면 위 경로를 그대로 탑니다.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ing-eoking
ing-eoking force-pushed the lane-ops branch 2 times, most recently from c81bd83 to 51b5810 Compare November 5, 2026 14:10
@ing-eoking
ing-eoking force-pushed the graph branch 2 times, most recently from 498c0a8 to fe2b48b Compare November 5, 2026 15:15
@ing-eoking
ing-eoking force-pushed the lane-ops branch 2 times, most recently from 5340c0d to b6f3a4e Compare November 5, 2026 15:45
@ing-eoking
ing-eoking force-pushed the lane-ops branch 2 times, most recently from 72aa82f to df59c56 Compare November 6, 2026 00:05
@ing-eoking
ing-eoking force-pushed the graph branch 2 times, most recently from 73ba67d to 21b3531 Compare November 6, 2026 01:19
@ing-eoking
ing-eoking marked this pull request as draft November 6, 2026 03:15
@ing-eoking
ing-eoking force-pushed the lane-ops branch 2 times, most recently from 1d0afc9 to bf83e9a Compare November 6, 2026 08:35
Comment thread src/event.rs Outdated
let Some(op) = op_of(ev) else {
return;
};
if let Op::Delete { index, map, .. } = &op

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

graph가 없으면 Delete는 lane 큐를 거치지 않고 바로 해제되는 것 같습니다.

복제나 재생으로 이벤트가 연달아 오면 Insert가 해제된 element를 읽을 수 있어 보입니다.

엔진                 lane
create  ─→  [Create]       (graph 아직 없음)
insert  ─→  [Insert]
delete  ─→  graph 없음 → 바로 해제
            Create 실행
            Insert 실행 → 해제된 element 읽음

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

수정되었습니다.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

아직 안 올라온 것 같습니다

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

아;; 브랜치 관리가 꼬여서 다시 올렸습니다.

Comment thread src/index.rs Outdated

/// Builds the index `spec` describes and registers it under its name.
pub fn create(spec: &Create<'_>) -> Result<(), Error> {
pub fn create_with(name: &str, map: usize, config: &[u8]) -> Result<(), Error> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: register와 합쳐도 될 것 같습니다.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: 함수명 create로 해도 되나요? _with를 사용한 이유가 있나요?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

이름은 ai가 추천한 것으로 config를 따로 줘서 생성하는 거라 create_with를 추천한다고 합니다.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

create로 합쳤습니다.

Base automatically changed from graph to develop November 13, 2026 03:09
@ing-eoking
ing-eoking marked this pull request as ready for review November 13, 2026 05:09
@ing-eoking
ing-eoking merged commit 7482f26 into develop Nov 13, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
ee — e4bb0289 Deployed Nov 13, 2026 by ing-eoking via Build arcus-memcached #89
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.

3 participants