Skip to content

Add meta command methods to MemcacheSocket#14

Merged
bisho merged 1 commit into
mainfrom
03-11-direct_meta_commands_api_in_socket
Mar 24, 2026
Merged

Add meta command methods to MemcacheSocket#14
bisho merged 1 commit into
mainfrom
03-11-direct_meta_commands_api_in_socket

Conversation

@bisho
Copy link
Copy Markdown
Member

@bisho bisho commented Mar 13, 2026

Motivation / Description

This pull request implements comprehensive memcache meta command support with both pipelining and blocking APIs. The implementation adds two tiers of functionality: send_meta_* methods for pipelining (send commands and read responses separately) and meta_* methods for blocking operations (send and receive in one call). The get_response() method is enhanced to automatically read value data for Value responses, eliminating the need for separate get_value() calls.

Changes introduced

  • Added send_meta_get, send_meta_set, send_meta_delete, and send_meta_arithmetic methods for pipelining support
  • Added meta_get, meta_set, meta_delete, and meta_arithmetic methods for blocking operations
  • Enhanced get_response() to automatically read and include value bytes in Value responses
  • Implemented automatic NOOP injection for no_reply commands in mutation operations
  • Replaced send_all_with_noop() with more flexible send_iovecs() function supporting multiple buffers via writev()
  • Refactored value reading logic with improved buffer management and ENDL validation
  • Added get_response_with_value() internal method that handles both header parsing and value reading in a single GIL-released block
  • Added is_no_reply() helper method to RequestFlags for internal use
  • Removed separate get_value() method as value data is now included automatically in Value responses
  • Updated error handling to remove retry logic for interrupted system calls
  • Enhanced test coverage for all new meta command functionality, pipelining scenarios, and no_reply behavior

@bisho bisho marked this pull request as ready for review March 13, 2026 15:00
@bisho bisho force-pushed the 03-11-socket_in_rust branch from bf04b6e to e6bb63a Compare March 16, 2026 16:09
@bisho bisho force-pushed the 03-11-direct_meta_commands_api_in_socket branch 5 times, most recently from 978f263 to e10435b Compare March 17, 2026 02:09
@bisho bisho requested review from a team and xmartinez March 17, 2026 08:39
@bisho bisho force-pushed the 03-11-direct_meta_commands_api_in_socket branch from e10435b to 6ebdcec Compare March 17, 2026 08:55
@bisho bisho force-pushed the 03-11-socket_in_rust branch from e6bb63a to 7fc665e Compare March 17, 2026 08:55
This was referenced Mar 17, 2026
Copy link
Copy Markdown

@xmartinez xmartinez left a comment

Choose a reason for hiding this comment

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

Awesome!

Added some nits (nothing blocking, so also approved it).

Comment thread src/memcache_socket.rs Outdated
Comment thread src/memcache_socket.rs Outdated
Comment thread src/memcache_socket.rs Outdated
Comment thread src/memcache_socket.rs Outdated
Comment thread src/request_flags.rs Outdated
Comment thread src/memcache_socket.rs
@bisho bisho force-pushed the 03-11-direct_meta_commands_api_in_socket branch from 6ebdcec to 7815d98 Compare March 24, 2026 09:16
Copy link
Copy Markdown
Member Author

bisho commented Mar 24, 2026

Merge activity

  • Mar 24, 4:58 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 24, 5:09 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 24, 5:09 PM UTC: @bisho merged this pull request with Graphite.

@bisho bisho changed the base branch from 03-11-socket_in_rust to graphite-base/14 March 24, 2026 17:06
@bisho bisho changed the base branch from graphite-base/14 to main March 24, 2026 17:07
@bisho bisho force-pushed the 03-11-direct_meta_commands_api_in_socket branch from 7815d98 to f30afc3 Compare March 24, 2026 17:08
@bisho bisho merged commit 01deb21 into main Mar 24, 2026
15 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.

2 participants