ajtack / riak-cpp Goto Github PK
View Code? Open in Web Editor NEWA Riak client library for use with C++11 compilers.
License: MIT License
A Riak client library for use with C++11 compilers.
License: MIT License
At the time of this writing, Riak-cpp relies entirely on traditional functions (with std::bind, for instance) to react to various operations. This is due to the original goal of first-class g++ v4.4 support. However, we need to explicitly target these new technologies.
Failure as per the below stacktrace.
(gdb) r
Starting program: /Users/tack/Desktop/riak-cpp/build/test/units/unit_tests
Reading symbols for shared libraries ++++++++........................... done
[==========] Running 22 tests from 4 test cases.
[----------] Global test environment set-up.
[----------] 5 tests from deleting_client
[ RUN ] deleting_client.client_survives_nonsense_reply_to_unmap
unit_tests(5110) malloc: *** error for object 0x1005e3560: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Program received signal SIGABRT, Aborted.
0x00007fff90ebd82a in __kill ()
(gdb) bt
#0 0x00007fff90ebd82a in __kill ()
#1 0x00007fff99443a9c in abort ()
#2 0x00007fff994a284c in free ()
#3 0x00007fff98340702 in std::string::_Rep::_M_dispose ()
#4 0x00007fff98341424 in std::string::reserve ()
#5 0x00007fff9834151d in std::string::append ()
#6 0x000000010036f4f5 in google::protobuf::MessageLite::AppendPartialToString ()
#7 0x000000010036f46a in google::protobuf::MessageLite::AppendToString ()
#8 0x000000010036f58b in google::protobuf::MessageLite::SerializeToString ()
#9 0x000000010005bafb in riak::message::(anonymous namespace)::package_with_code<RpbDelReq> ()
#10 0x000000010005b6dc in riak::message::encode<RpbDelReq> ()
#11 0x000000010004bdc5 in riak::client::delete_object ()
#12 0x00000001000010f7 in riak::test::deleting_client_client_survives_nonsense_reply_to_unmap_Test::TestBody ()
#13 0x00000001004eccf6 in testing::Test::Run ()
#14 0x00000001004ed5e3 in testing::internal::TestInfoImpl::Run ()
#15 0x00000001004edc5f in testing::TestCase::Run ()
#16 0x00000001004f22a5 in testing::internal::UnitTestImpl::RunAllTests ()
#17 0x00000001000192a8 in main ()
Unless we set a very high timeout (e.g., 50 seconds), we're hitting this assertion:
riak/request_with_timeout.cxx:44: void riak::request_with_timeout::on_response(std::error_code, size_t, const std::string&): Assertion `not succeeded_ and (!! terminate_request_)' failed.
Is there something we might be doing wrong, or is that a bug in riak-cpp?
SCons has served its purpose of getting this project off the ground. One of the things that has been a problem for me in the past is poor compatibility between versions of SCons; I've already had that problem once in this project.
CMake seems to have some traction in cross-platform building. We should try it out, see if it suits the project.
I am getting this error when I try to build the sources: error C2220: warning treated as error - no 'object' file generated
What am I doing wrong?
1>------ Build started: Project: riak-cpp, Configuration: Debug x64 ------
1>Build started 06/03/2013 19:41:28.
1>InitializeBuildStatus:
1> Touching "x64\Debug\riak-cpp.unsuccessfulbuild".
1>CustomBuild:
1> All outputs are up-to-date.
1>ClCompile:
1> client.cxx
1> message.cxx
1> request_with_timeout.cxx
1> riakclient.pb.cc
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2227): error C2220: warning treated as error - no 'object' file generated
I am using the newest sources from https://github.com/ajtack/riak-cpp.git
Currently, the only supported asynchronous behavior is by boost::future. The other overload of riak::object::fetch should accept callback functions. Implement this overload.
Currently, if a PUT response were to arrive in multiple chunks from the riak::transport device, the response would be rejected. We should use riak::message::make_buffering_handler
to correctly buffer such responses until a complete message is received.
Definition of Done: A passing unit test shows that PUT responses behave in a way matching GET and DELETE responses: that a response message arriving in multiple parts is correctly combined and returned to the caller.
Currently, the only supported asynchronous behavior is by boost::future. The other overload of riak::object::put should accept callback functions. Implement this overload.
I'm certain I've used something that isn't available in MSVC v10. For example, MSVC does not support the keyword "and" in place of &&.
Discovered while fixing #26: The intention of the DEBUG=no builds was, in addition to the enabling of stacktrace-mangling optimization, that assertions would be disabled. This apparently doesn't work as of v0.2, and it needs to be addressed.
With the current connection pooling interface, each new connection will result in a new client ID. This will cause rapid key explosion. Definition of Done:
Compiling on different platforms is going to be a never-ending problem. For those that want to use Riak-Cpp, we need to produce binary installations for them.
Target the following platforms:
Currently, a get/put/delete operation must be waited upon at the client.hxx level. It so happens it may be easy to shut down networking and thus trigger a rapid flood of socket cancellation errors, but this seems a bit roundabout.
It may be valuable to be able to cancel an operation at the client.hxx
interface level. This also gets back into synchronous programming against Riak-Cpp, though, which I'm inclined to discourage.
This idea is in the "Do we need it?" question phase.
GCC v4.7 introduces the noexcept
term and employs it in <system_error>
, which causes a compilation failure. Correct the code such that error.cxx compiles under all GCC compilers uniformly.
Riak-Cpp should expose mean/min/max for various time periods of such values as:
Before this can reasonably be used by performant server software, connection pooling is a must. To satisfy this issue, the library must support:
A complete implementation will also provide a default connection pool implementation, which will include test plans.
The following are optional:
I grabed the sources and got the error message
"the projet file ' ' has been renamed or is no longer in the solution"
in Visual Studio 2010 when I tried to build.
Update: I might have messed up my VS2010 installation. I get some wired errors like "\Git\bin";"D:\Program was unexpected at this time." Need to check my environment.
Due to my misinterpretation of the client implementation guide, Riak-Cpp currently allows a user to replace any number of siblings blindly with a new value. The correct behavior as described by Russell Brown:
"Clients (that automatically fetch before store) must chose to either
a) perform automatic Sibling Resolution or
b) abort the write and notify the presence of siblings to the caller."
Riak-Cpp v0.1 only supports get, put, and delete. It does all things sibling resolution and a few other goodies as well, but fundamentally this is only the basic CRUD operations. Riak (the server), meanwhile, provides many searching, indexing and status-gathering features. Implementations of these features will require prioritization by an actual user of Riak-Cpp.
Produce an ordered list of implementation priorities from either the PBC API (preferred) or the HTTP API.
Currently, one has to PUT
in the following sequence.
auto o = store(...).bucket("docs")["test"];
auto result = o.fetch();
result.wait();
// now o has the vector clock cached.
o.put("new value");
Unless we want to force users to ALWAYS consider siblings (which seems like too much overhead), one should be able to execute the last line and have riak automatically get the latest vector clock and push against it. Siblings will happen either way, actually.
Currently, the only supported asynchronous behavior is by boost::future. The other overload of riak::bucket::unset should accept callback functions. Implement this overload.
Currently, the Riak client does not log at all. It hasn't been a problem yet, but logs are invaluable in the debugging of larger systems.
Implement logging in the form of hooks that are implemented by default, but that can be disabled or wired elsewhere.
In the current state (unlicenced), the code has an implicit copyright. This means I can withdraw this code from the public and prevent y'all from using it at a whim. I don't think this is fair. Rather, the license I want for this:
I would love suggestions. I'm considering the New BSD licence.
At v1.0, Riak-Cpp has everything it needs to solve some subset of people's C++/Riak problems. Our target audience is high-performance server programmers using Riak as a backend.
Definition of Done:
Note that, for (2), we refer not to those features that were missing from 0.x implementations due to oversight, but rather those features that weren't considered for inclusion because those requirements had not been expressed. The former belongs in a 0.x release, and the set of those things may be empty.
"If debugging is the process of removing bugs, then programming must be the process of putting them in."
Currently, failure to resolve siblings (by throwing an exception, for instance) will cause undefined behavior and leaking. Users need to be able to abort a read or write if they encounter a sibling set that they cannot resolve. Their server can then report an error that allows them to resolve the case.
Suggest:
riak::errc::unresolvable_siblings
to report as the reason for the failed read/write to the application.riak::unresolvable_siblings
? Check how to interact with system_error
.) that sibling resolution routines can throw when they get into trouble.Currently, we only provide the single serial socket transport by default. This is fine while we're getting off the ground, but it ain't ideal. An improved connection pooling alternative should:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.