Giter Club home page Giter Club logo

kissdb's People

Contributors

adamierymenko avatar sth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kissdb's Issues

CC0 is a problematic license because its not really a software license

Hi,

Putting stuff in the public domain feels like a "wide open" way of releasing your software, but it has a great deal of ambiguity since it doesn't really say if you're going to enforce your copyright and patents or not.

Please consider using a real Free Software license. Something that forces your code to remain free, like the GPL. If you have issues with the GPL, please consider the MIT license which is likely going to make the use of your software by other projects much easier since it states explicitly what you intend with your copyright.

Many thanks for your software and for your consideration of this issue.

Regards,

Jeremiah

KISSDB_get always failing when failed once

Working on a multiple access database. If a call to KISSDB_get fails as the key does not exists yet then that call will always fails even though the key has been written by another process.

Not sure if this is a bug or an expected behaviour. My work around for now is to close and reopen the db.

I wrote these two codes to illustrate this. A and B. On an existing db run A which should say fail as the key 100 does not exists. While A runs run B to write the key 100. A will still say fail. Close A and relaunch. It will now find the key.

A

#include <stdio.h>
#include "kissdb.h"
#include <inttypes.h>
#include <signal.h>
#include <unistd.h>

static volatile int keepRunning = 1;
void intHandler(int dummy) {
	keepRunning = 0;
}

int main(int argc, char *argv[]){
	KISSDB db;
	uint64_t paquets[2];
	uint64_t key = 100;
	KISSDB_open(&db,"test.db",KISSDB_OPEN_MODE_RDWR,1024,8,sizeof(paquets));
	
	
	while (1){
	
		if (KISSDB_get(&db, &key, paquets)) printf("fails\n");
		else printf("ok\n");
		sleep(2);	
	
	}
}

B

#include <stdio.h>
#include "kissdb.h"
#include <inttypes.h>
#include <signal.h>
#include <unistd.h>

static volatile int keepRunning = 1;
void intHandler(int dummy) {
	keepRunning = 0;
}

int main(int argc, char *argv[]){
	KISSDB db;
	uint64_t paquets[2];
	uint64_t key = 100;
	KISSDB_open(&db,"test.db",KISSDB_OPEN_MODE_RWCREAT,1024,8,sizeof(paquets));
	KISSDB_put(&db, &key, paquets);
	KISSDB_close(&db);

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.