zookeeper 1.4.11-java → 1.5.3-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ diff -ur zkc-3.4.5-orig/c/src/mt_adaptor.c zkc-3.4.5/c/src/mt_adaptor.c
2
+ --- zkc-3.4.5-orig/c/src/mt_adaptor.c 2012-09-30 10:53:32.000000000 -0700
3
+ +++ zkc-3.4.5/c/src/mt_adaptor.c 2016-09-07 16:55:13.787553837 -0700
4
+ @@ -484,11 +484,7 @@
5
+ {
6
+ #ifndef WIN32
7
+ int32_t result;
8
+ - asm __volatile__(
9
+ - "lock xaddl %0,%1\n"
10
+ - : "=r"(result), "=m"(*(int *)operand)
11
+ - : "0"(incr)
12
+ - : "memory");
13
+ + result = __sync_fetch_and_add(operand, incr);
14
+ return result;
15
+ #else
16
+ volatile int32_t result;
data/ext/zkrb.c CHANGED
@@ -203,7 +203,6 @@ inline static int we_are_forked(zkrb_instance_data_t *zk) {
203
203
  return rv;
204
204
  }
205
205
 
206
-
207
206
  static int destroy_zkrb_instance(zkrb_instance_data_t* zk) {
208
207
  int rv = ZOK;
209
208
 
@@ -245,6 +244,11 @@ static void free_zkrb_instance_data(zkrb_instance_data_t* ptr) {
245
244
  destroy_zkrb_instance(ptr);
246
245
  }
247
246
 
247
+ VALUE alloc_zkrb_instance(VALUE klass) {
248
+ zkrb_instance_data_t* zk = ZALLOC_N(zkrb_instance_data_t, 1);
249
+ return Data_Wrap_Struct(klass, NULL, free_zkrb_instance_data, zk);
250
+ }
251
+
248
252
  static void print_zkrb_instance_data(zkrb_instance_data_t* ptr) {
249
253
  fprintf(stderr, "zkrb_instance_data (%p) {\n", ptr);
250
254
  fprintf(stderr, " zh = %p\n", ptr->zh);
@@ -1013,7 +1017,7 @@ static void zkrb_define_methods(void) {
1013
1017
  DEFINE_METHOD(close_handle, 0);
1014
1018
  DEFINE_METHOD(deterministic_conn_order, 1);
1015
1019
  DEFINE_METHOD(is_unrecoverable, 0);
1016
- DEFINE_METHOD(recv_timeout, 1);
1020
+ DEFINE_METHOD(recv_timeout, 0);
1017
1021
  DEFINE_METHOD(zkrb_state, 0);
1018
1022
  DEFINE_METHOD(sync, 2);
1019
1023
  DEFINE_METHOD(zkrb_iterate_event_loop, 0);
@@ -1063,6 +1067,7 @@ void Init_zookeeper_c() {
1063
1067
 
1064
1068
  /* initialize CZookeeper class */
1065
1069
  CZookeeper = rb_define_class_under(mZookeeper, "CZookeeper", rb_cObject);
1070
+ rb_define_alloc_func(CZookeeper, alloc_zkrb_instance);
1066
1071
  zkrb_define_methods();
1067
1072
 
1068
1073
  ZookeeperClientId = rb_define_class_under(CZookeeper, "ClientId", rb_cObject);
data/java/java_base.rb CHANGED
@@ -183,13 +183,11 @@ class JavaBase
183
183
  attr_reader :event_queue
184
184
 
185
185
  def reopen(timeout=10, watcher=nil, opts = {})
186
- # watcher ||= @default_watcher
187
-
188
186
  @mutex.synchronize do
189
187
  @req_registry.clear_watchers!
190
188
 
191
189
  replace_jzk!(opts)
192
- wait_until_connected
190
+ wait_until_connected(timeout)
193
191
  end
194
192
 
195
193
  state
@@ -490,7 +488,7 @@ class JavaBase
490
488
 
491
489
  def replace_jzk!(opts = {})
492
490
  orig_jzk = @jzk
493
- if opts.has_key?(:session_id) && opts.has_key(:session_passwd)
491
+ if opts.has_key?(:session_id) && opts.has_key?(:session_passwd)
494
492
  @jzk = JZK::ZooKeeper.new(@host, DEFAULT_SESSION_TIMEOUT, JavaCB::WatcherCallback.new(event_queue, :client => self), opts.fetch(:session_id), opts.fetch(:session_passwd).to_java_bytes)
495
493
  else
496
494
  @jzk = JZK::ZooKeeper.new(@host, DEFAULT_SESSION_TIMEOUT, JavaCB::WatcherCallback.new(event_queue, :client => self))
@@ -1,4 +1,4 @@
1
1
  module Zookeeper
2
- VERSION = '1.4.11'
2
+ VERSION = '1.5.3'
3
3
  DRIVER_VERSION = '3.4.5'
4
4
  end
@@ -4,7 +4,7 @@ unless defined?(::JRUBY_VERSION)
4
4
  describe %[forked connection] do
5
5
  let(:path) { "/_zktest_" }
6
6
  let(:pids_root) { "#{path}/pids" }
7
- let(:data) { "underpants" }
7
+ let(:data) { "underpants" }
8
8
  let(:connection_string) { Zookeeper.default_cnx_str }
9
9
 
10
10
  def process_alive?(pid)
@@ -15,7 +15,7 @@ unless defined?(::JRUBY_VERSION)
15
15
  end
16
16
 
17
17
  LBORDER = ('-' * 35) << '< '
18
- RBORDER = ' >' << ('-' * 35)
18
+ RBORDER = ' >' << ('-' * 35)
19
19
 
20
20
  def mark(thing)
21
21
  logger << "\n#{LBORDER}#{thing}#{RBORDER}\n\n"
@@ -25,8 +25,6 @@ unless defined?(::JRUBY_VERSION)
25
25
  mark "BEFORE: START"
26
26
  if defined?(::Rubinius)
27
27
  pending("this test is currently broken in rbx")
28
- # elsif ENV['TRAVIS']
29
- # pending("this test is currently hanging in travis")
30
28
  else
31
29
  @zk = Zookeeper.new(connection_string)
32
30
  rm_rf(@zk, path)
@@ -105,7 +103,7 @@ unless defined?(::JRUBY_VERSION)
105
103
  @zk.resume_after_fork_in_parent
106
104
 
107
105
  event_waiter_th = Thread.new do
108
- @latch.await(5) unless @event
106
+ @latch.await(5) unless @event
109
107
  @event
110
108
  end
111
109
 
@@ -1051,7 +1051,11 @@ shared_examples_for "connection" do
1051
1051
  zk.close
1052
1052
  end
1053
1053
 
1054
- zk.stat(:path => path, :callback => evil_cb)
1054
+ begin
1055
+ zk.stat(:path => path, :callback => evil_cb)
1056
+ rescue IOError
1057
+ # captures flaky IOError: stream closed in another thread
1058
+ end
1055
1059
 
1056
1060
  wait_until { zk.closed? }
1057
1061
  zk.should be_closed
@@ -3,10 +3,6 @@ module Zookeeper
3
3
  !!ENV['SPAWN_ZOOKEEPER']
4
4
  end
5
5
 
6
- def self.travis?
7
- !!ENV['TRAVIS']
8
- end
9
-
10
6
  def self.default_cnx_host
11
7
  ENV['ZK_DEFAULT_HOST'] || 'localhost'
12
8
  end
data/zookeeper.gemspec CHANGED
@@ -6,13 +6,21 @@ Gem::Specification.new do |s|
6
6
  s.name = 'zookeeper'
7
7
  s.version = Zookeeper::VERSION
8
8
 
9
- s.authors = ["Phillip Pearson", "Eric Maland", "Evan Weaver", "Brian Wickman", "Neil Conway", "Jonathan D. Simms"]
9
+ s.authors = [
10
+ "Phillip Pearson",
11
+ "Eric Maland",
12
+ "Evan Weaver",
13
+ "Brian Wickman",
14
+ "Neil Conway",
15
+ "Jonathan D. Simms",
16
+ "Mal McKay",
17
+ ]
10
18
  s.email = ["slyphon@gmail.com"]
11
19
  s.summary = %q{Apache ZooKeeper driver for Rubies}
12
20
  s.description = <<-EOS
13
21
  A low-level multi-Ruby wrapper around the ZooKeeper API bindings. For a
14
22
  friendlier interface, see http://github.com/slyphon/zk. Currently supported:
15
- MRI: {1.8.7, 1.9.2, 1.9.3}, JRuby: ~> 1.6.7, Rubinius: 2.0.testing, REE 1.8.7.
23
+ MRI: {2.5, 2.6, 2.7, 3.0}, JRuby: ~> 9.2.x.x
16
24
 
17
25
  This library uses version #{Zookeeper::DRIVER_VERSION} of zookeeper bindings.
18
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zookeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.11
4
+ version: 1.5.3
5
5
  platform: java
6
6
  authors:
7
7
  - Phillip Pearson
@@ -10,10 +10,11 @@ authors:
10
10
  - Brian Wickman
11
11
  - Neil Conway
12
12
  - Jonathan D. Simms
13
- autorequire:
13
+ - Mal McKay
14
+ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
- date: 2015-09-28 00:00:00.000000000 Z
17
+ date: 2022-07-18 00:00:00.000000000 Z
17
18
  dependencies:
18
19
  - !ruby/object:Gem::Dependency
19
20
  name: slyphon-log4j
@@ -43,31 +44,26 @@ dependencies:
43
44
  - - '='
44
45
  - !ruby/object:Gem::Version
45
46
  version: 3.3.5
46
- description: ! 'A low-level multi-Ruby wrapper around the ZooKeeper API bindings.
47
- For a
48
-
47
+ description: |+
48
+ A low-level multi-Ruby wrapper around the ZooKeeper API bindings. For a
49
49
  friendlier interface, see http://github.com/slyphon/zk. Currently supported:
50
-
51
- MRI: {1.8.7, 1.9.2, 1.9.3}, JRuby: ~> 1.6.7, Rubinius: 2.0.testing, REE 1.8.7.
52
-
50
+ MRI: {2.5, 2.6, 2.7, 3.0}, JRuby: ~> 9.2.x.x
53
51
 
54
52
  This library uses version 3.4.5 of zookeeper bindings.
55
53
 
56
-
57
- '
58
54
  email:
59
55
  - slyphon@gmail.com
60
56
  executables: []
61
57
  extensions: []
62
58
  extra_rdoc_files: []
63
59
  files:
64
- - .ctags_paths
65
- - .dotfiles/ruby-gemset
66
- - .dotfiles/ruby-version
67
- - .dotfiles/rvmrc
68
- - .gitignore
69
- - .gitmodules
70
- - .travis.yml
60
+ - ".ctags_paths"
61
+ - ".dotfiles/ruby-gemset"
62
+ - ".dotfiles/ruby-version"
63
+ - ".dotfiles/rvmrc"
64
+ - ".github/workflows/build.yml"
65
+ - ".gitignore"
66
+ - ".gitmodules"
71
67
  - CHANGELOG
72
68
  - Gemfile
73
69
  - Guardfile
@@ -87,6 +83,9 @@ files:
87
83
  - ext/extconf.rb
88
84
  - ext/generate_gvl_code.rb
89
85
  - ext/patches/zkc-3.3.5-network.patch
86
+ - ext/patches/zkc-3.4.5-buffer-overflow.patch
87
+ - ext/patches/zkc-3.4.5-config.patch
88
+ - ext/patches/zkc-3.4.5-fetch-and-add.patch
90
89
  - ext/patches/zkc-3.4.5-logging.patch
91
90
  - ext/patches/zkc-3.4.5-out-of-order-ping.patch
92
91
  - ext/patches/zkc-3.4.5-yosemite-htonl-fix.patch
@@ -145,25 +144,24 @@ files:
145
144
  homepage: https://github.com/slyphon/zookeeper
146
145
  licenses: []
147
146
  metadata: {}
148
- post_install_message:
147
+ post_install_message:
149
148
  rdoc_options: []
150
149
  require_paths:
151
150
  - lib
152
151
  - java
153
152
  required_ruby_version: !ruby/object:Gem::Requirement
154
153
  requirements:
155
- - - ! '>='
154
+ - - ">="
156
155
  - !ruby/object:Gem::Version
157
156
  version: '0'
158
157
  required_rubygems_version: !ruby/object:Gem::Requirement
159
158
  requirements:
160
- - - ! '>='
159
+ - - ">="
161
160
  - !ruby/object:Gem::Version
162
161
  version: '0'
163
162
  requirements: []
164
- rubyforge_project:
165
- rubygems_version: 2.2.2
166
- signing_key:
163
+ rubygems_version: 3.2.3
164
+ signing_key:
167
165
  specification_version: 4
168
166
  summary: Apache ZooKeeper driver for Rubies
169
167
  test_files:
@@ -184,3 +182,4 @@ test_files:
184
182
  - spec/support/progress_formatter.rb
185
183
  - spec/support/zookeeper_spec_helpers.rb
186
184
  - spec/zookeeper_spec.rb
185
+ ...
data/.travis.yml DELETED
@@ -1,39 +0,0 @@
1
- ---
2
- notifications:
3
- email:
4
- - slyphon@gmail.com
5
- - eric@5stops.com
6
-
7
- # pull in releaseops submodule
8
- before_install:
9
- - git submodule update --init --recursive
10
-
11
- env:
12
- - SPAWN_ZOOKEEPER='true'
13
-
14
- language: ruby
15
-
16
- rvm:
17
- - 1.9.3
18
- - 1.9.2
19
- - 1.8.7
20
- - ree
21
- - jruby-18mode
22
- - jruby-19mode
23
- - rbx-18mode
24
- - rbx-19mode
25
- - 2.0.0
26
- - 2.1.0
27
- - 2.2.0
28
- matrix:
29
- allow_failures:
30
- - rvm: rbx-18mode
31
- - rvm: rbx-19mode
32
-
33
- bundler_args: --without development docs coverage
34
-
35
- # blacklist
36
- branches:
37
- except:
38
- # - 'dev/zookeeper-st'
39
-