aerospike / aerospike-client-c

Aerospike C Client
Other
98 stars 103 forks source link

XDR doesn't work after we migrate CLIENT library to V4.3.17 #87

Closed earnestzhao closed 5 years ago

earnestzhao commented 5 years ago

Dear Developers,

We found an issue which seems that XDR doesn't work after we migrate aerospace-client-c library to Version 4.3.17. We did a test that if we used AQL to insert data, the XDR did work. So, could you please tell me if there are any points which we need to care more about for using the XDR?

Our usage of "PUT" operation seems like below:

    as_policy_write w_params;
    as_policy_write_init(&w_params); 
    w_params.base.total_timeout = timeout;
    as_record_inita(&rec, 1);
    as_record_set_raw(&rec, "", (uint8_t*)task->value_.c_str(), (uint32_t)task->value_.length()); 
    rec.ttl = (uint32_t)(task->ttl_);
    as_status ret = aerospike_key_put_async(
        as_[idx],
        &err,
        &w_params,
        &key,
        &rec,
        write_task_callback, 
        task,
        evs_[idx],
        NULL 
    );
    if (ret != AEROSPIKE_OK) 
    {
        // LOG
    }

Thanks, Earnest Zhao

BrianNichols commented 5 years ago

What error was returned from your code snippet?

How are you migrating the C client?

The enterprise server (which contains XDR functionality) links with a static C client library with a fixed version. How could you (or want to) change this C client version?

earnestzhao commented 5 years ago

Thank you for your quick reply. The phenomenon is the writing operation returns success, but we could not see the record in other data centers after so long a time. But if we use AQL or the last version of Aerospike C Client, we can see the record in other data centers very soon. I think there are some unclear points when we use the new library V4.3.17. Could you please give us more information about that?

earnestzhao commented 5 years ago

And could you tell us more about the macro USE_XDR?

BrianNichols commented 5 years ago

The USE_XDR macro is for internal Aerospike Enterprise Server builds only. Aerospike Enterprise Server links with a special build of the C client to communicate with other Aerospike servers. USE_XDR should never be defined in a user compile of the C client.

I believe the other questions should be answered in your helpdesk case.

earnestzhao commented 5 years ago

OK, thank you very much. The problem was resolved.