Skip to content

FEATURE: add JSON operation (CREATE/SET/GET/DELETE)#962

Merged
namsic merged 1 commit intonaver:json-pocfrom
66Hello-world99:json
Feb 27, 2026
Merged

FEATURE: add JSON operation (CREATE/SET/GET/DELETE)#962
namsic merged 1 commit intonaver:json-pocfrom
66Hello-world99:json

Conversation

@66Hello-world99
Copy link
Copy Markdown

@66Hello-world99 66Hello-world99 commented Feb 2, 2026

🔗 Related Issue

  • jam2in/arcus-works#823

⌨️ What I did

@namsic namsic self-requested a review February 2, 2026 08:33
Copy link
Copy Markdown
Collaborator

@namsic namsic left a comment

Choose a reason for hiding this comment

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

전반적으로 코드 스타일 확인하고 정리해 주세요.

개발 중에 작성한 것으로 보이는 주석도 여럿 있는데 실제 반영할 때 포함시킬 의도로 작성한 주석이면 남겨 두고,
코드 작성 중에 참고하기 위해 남긴 메모 성격의 주석은 제거해 주세요.

Comment thread Makefile.am Outdated
Comment thread include/memcached/types.h Outdated
Comment thread engines/default/json/jsondata.c Outdated
Comment thread stats_prefix.c
Comment on lines +1165 to +1166
}
void stats_prefix_record_jop_set(const char *key, const size_t nkey, const bool is_hit) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

사이에 빈 line 하나 들어가야 할 것 같습니다.

Comment thread jsonsl/jsonsl.h
@jhpark816 jhpark816 requested a review from ing-eoking February 3, 2026 06:44
Copy link
Copy Markdown
Collaborator

@ing-eoking ing-eoking left a comment

Choose a reason for hiding this comment

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

JSON Item 자체는 Slab으로부터 공간을 할당하나 내부 element는 직접 malloc을 통해 할당받고 있는 것으로 보입니다.

이럴 경우 cost가 꽤 큰 것으로 보이는데, 혹시 이유가 있나요?

Comment thread engines/default/json/jsondata.c Outdated
Comment thread jsonsl/jsonsl.h
Comment thread configure.ac Outdated
@ing-eoking

This comment was marked as resolved.

@66Hello-world99 66Hello-world99 force-pushed the json branch 5 times, most recently from d21bf62 to 5b60d39 Compare February 11, 2026 08:38
Comment thread engines/default/coll_json.c Outdated
if (ret != ENGINE_SUCCESS) break;

if (!search_path_is_root_path(&jpn->sp)) {
if (search_path_find_ex(&jpn->sp, root, &jpn->n, &jpn->p) != ENGINE_SUCCESS) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ENGINE_SUCCESS가 아닌 E_OK 로 변경하는 편이 좋을 것 같습니다.

engines/default/coll_json.c:241:71: error: comparison of different enumeration types ('path_error' and 'ENGINE_ERROR_CODE') [-Werror,-Wenum-compare]
  241 |             if (search_path_find_ex(&jpn->sp, root, &jpn->n, &jpn->p) !=  ENGINE_SUCCESS) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^   ~~~~~~~~~~~~~~

Comment thread memcached.c
}
c->coll_attrp = &c->coll_attr_space;
process_jop_create(c, key, nkey, c->coll_attrp);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

이곳에 아래 로직 추가

 else {
  print_invalid_command(c, tokens, ntokens);
  out_string(c, "ERROR unknown command");
}

@ing-eoking
Copy link
Copy Markdown
Collaborator

@66Hello-world99

이전에 발표한 설계 내용이 PR에 반영된 상태인가요?

@namsic namsic merged commit 32b3e6f into naver:json-poc Feb 27, 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.

3 participants