Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7657217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:58:16+00:00 2026-05-31T12:58:16+00:00

SOLVED: I tried appending a single SerialKey to the list. When I now append

  • 0

SOLVED: I tried appending a single SerialKey to the list. When I now append a SerialKeyList with one key, it works as it should be.

I am using memcached with libmemcached and the google protocol buffers to save a list in the cache which consists of a list of elements and a list of blacklisted elements.

The .proto is:

message SerialKeyList {
repeated SerialBlackKey bkey = 2;
repeated SerialKey key = 1;
}

message SerialKey {
optional string key = 1;
}

message SerialBlackKey {
optional string key = 2;
}

I would like to append single elements of either type SerialKey or SerialBlackKey with memcached_append().
I initialize the list with one SerialKey element (with memcached_set(SerialKeyList)), and then append one SerialBlackKey element (with memcached_append).

The result I am getting when parsing the list from memcached and printing with PrintDebugString() is

key {
  key: "REPL:http://a.host.com/replica" 
}
bkey {
  10: "PL:http://a.host.com/replica" 
}

So the two lists are created, but the 2nd element is not read correctly.

Should that be possible? From the Protobuf encoding documentation I understand that repeated fields do not have to follow another, so interleaving fields of the other type should be possible.

/EDIT: I have the same problem with only one type of element (SerialKey) in the list.
Here I use a further attribute on SerialKey to decide whether it is in the blacklist.
Proto:

message SerialKeyList {
  repeated SerialKey key = 1;
}

message SerialKey {
  required string key = 1;
  required bool white = 2 [default = true];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:58:17+00:00Added an answer on May 31, 2026 at 12:58 pm

    You are right – te spec states that implementations must allow fields in any order, specifically to support this append scenario.

    The key to appending is that it must still look like a SerialKeyList, even if you append a SerialKeyList with just a single SerialKey or SerialBlackKey.

    Note also: I have no idea if append works if you are using the string version – the binary version is certainly appendable, though.

    For a more specific answer you probably need to show how you are constructing this, and state which implementation you are using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem solved now i want to define one edit text to left and other
how can a logarithm be solved on the iphone. I tried using different methods
solved: IstBestellwert = grouped.Sum(o => (double)o.SollMenge * (double)o.Preis) works My SQL Statment SELECT ABId,
I'm thinking that someone might of already solved this problem. I tried to look
I have tried to understand and use urlencode, but the problem can't be solved.
I've solved my problem, but because I have tried and failed to solve it
I've read & tried a few posts but can't get this problem solved. I'm
SOLVED! This works, I need to tell the compiler that T implements IEquatable of
SOLVED: I was using icons from sdk v9 (Android 2.3 Gingerbread) which seems to
I tried this using Jsonkit and Apple's JSON serializer with no luck. It keeps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.