Git Product home page Git Product logo

rufus-tokyo's People

Contributors

arunthampi avatar automatthew avatar copiousfreetime avatar jeg2 avatar jmettraux avatar jwreagor avatar kennethkalmer avatar nofxx avatar pietro avatar therealadam 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

rufus-tokyo's Issues

keys / values .to_s

as requested by Ilya...
(double check with Edo, it might be a Tokyo-only issue)

cannot call #close in ruby 1.9

I tried this on 2 machines, with a variety of versions of ffi and tokyo cabinet. It works in 1.8, but does not in 1.9, failing on the line 'db.close':

require 'rubygems'
require 'rufus/tokyo'

def test_tokyo
  db = Rufus::Tokyo::Cabinet.new('/tmp/data.tch', :type => :hash,
                                                  :mode => 'wc', # create/write
                                                  :opts => 'ld')
  db['nada'] = 'surf'
  puts "Should be 'surf': #{db['nada']}"
  puts "Should be 'nil': #{db['xyz']}"
  5000.times { |i| db[(i+1).to_s] = "x" }
  puts "Should be '5000': #{db.inject { |r, (k, v)| k }}"
  closed = db.close
  puts "Should be 'true': #{closed}"
  raise "Could not close db" if !closed # this line really pukes in 1.9
end

5.times {test_tokyo; sleep 0.5}

Unknow bug during table creating/opening.

I tried to run example with the creation of a new table and here is what I got:

require 'rubygems'
require 'rufus/tokyo'
t = Rufus::Tokyo::Table.new('table.tct')
Rufus::Tokyo::TokyoError: (err 0) success
from /home/lumrandir/.rvm/gems/ruby/1.8.6/gems/rufus-tokyo-1.0.1/lib/rufus/tokyo/cabinet/table.rb:603:in raise_error' from /home/lumrandir/.rvm/gems/ruby/1.8.6/gems/rufus-tokyo-1.0.1/lib/rufus/tokyo/cabinet/table.rb:588:inlibcall'
from /home/lumrandir/.rvm/gems/ruby/1.8.6/gems/rufus-tokyo-1.0.1/lib/rufus/tokyo/cabinet/table.rb:136:in initialize' from (irb):14:innew'
from (irb):14
from /home/lumrandir/.rvm/ruby-1.8.6-p383/lib/ruby/site_ruby/1.8/rubygems/exceptions.rb:82

I ran it on Ruby 1.8.6-p383, but on Ruby 1.9.1 and Ruby Enterprise Edition 1.8.7 I have same error.

Environment:
rufus-tokyo 1.0.1
ffi 0.5.1
tokyocabinet 1.4.36
Slackware 13.0 x86

Please Reenable copy() for Tyrant Classes

Tyrant supports the hot backup feature and disabling it inside of rufus-tokyo doesn't provide any security. The feature is still active in the server and could be reached through a simple HTTP request. Forcing me to resort to that if I need the feature is just an inconvenience.

Sure, this feature can be dangerous. If you need to restrict access to it though, you want to do that at the server level so it affects everyone equally. This is the purpose of the -mask and -umask switches ttserver supports. You could also setup access to Tokyo Tyrant through something like SSH tunneling to restrict it to specific trusted users.

Thus, I believe disabling copy() is costing a feature without a noticeable gain.

error

Hi, I've got the next error when I was adding data to the DB. I'm using the last version downloaded and compiled fom
http://sourceforge.net/projects/tokyocabinet/files/

/var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo.rb:48:in `blen': undefined method `size' for nil:NilClass (NoMethodError)
    from /var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo/cabinet/util.rb:98:in `[]='
    from /var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo/cabinet/util.rb:191:in `block in from_h'
    from /var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo/cabinet/util.rb:191:in `each'
    from /var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo/cabinet/util.rb:191:in `inject'
    from /var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo/cabinet/util.rb:191:in `from_h'
    from /var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo/cabinet/util.rb:203:in `[]'
    from /var/lib/gems/1.9.0/gems/rufus-tokyo-0.1.14/lib/rufus/tokyo/cabinet/table.rb:227:in `[]='
    from main.rb:26:in `block in <main>'
    from main.rb:24:in `each'
    from main.rb:24:in `<main>'

open connection and exec overlap

"I was opening the database and then doing an exec, which resulted in the table being locked until the exec'd process ending."

implement auto-reconnect

after a certain timeout, check connection before next op.
instrument libcall / wrap libcall ?

What about EDO ? (don't forget tables)

B+ Database Segmentation Fault

Got a segmentation fault on TokyoCabinet B+ when doing Tokyo::Cabinet#getdup at non-existant key.

Way to reproduce:
db = Rufus::Tokyo::Cabinet.new('data.tcb')
db.putdup('a', 'v')
p db.getdup('a') # fine
p db.getdup('b') # segfault
db.close
Thanks!

use misc for lget

def lget (keys)

  #Hash[*call_misc('getlist', Rufus::Tokyo::List.new(keys))]
  keys.inject({}) { |h, k| v = self[k]; h[k] = v if v; h }
end

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.