prometheus-client-mmap 0.28.0-arm64-darwin → 0.28.1-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ceee745c12f8583c3c5cf11418c64402cb7eda30cf361116f91ee347e1321da0
4
- data.tar.gz: 7c7d7b8ef26b3a104f4e1d46ac34b5a16ef266b276a6eaf6a9217c626993a418
3
+ metadata.gz: af140c4fcee2eda007fe642f90cbddde28819047f8c49991d9b76f0413891acc
4
+ data.tar.gz: 4e36c3d6c317d8718fe5a431e07b784e493323bc4f058a335ca1ecbca241b6ad
5
5
  SHA512:
6
- metadata.gz: 8de84e798402f4ec5e13b74df9c2b5931beacc1107c7051f295809a80c578e0c9263df954988123afc5df3538c725c8f3520add371053a673bdd822fcb10496a
7
- data.tar.gz: 7f58180f027a10e5eefb9ab980401ce4a68e6db9b0edc088106d6e51ed5ad60641806ced8084a824724e26980aef65da7834f3fba0b81be370e87ac65df2950a
6
+ metadata.gz: c448775aed81267029e384ca3b34b012b3fe07ddb4b7449812ffbfd3b16d5744f5f400d7c132445c5b2049b0c2843abdfe3549022e03d5d01b57dd4fce2e12a8
7
+ data.tar.gz: a0e034ad7851040363a1d29371ea7956e8a4bce72142eaf29775f4f1e720509bfe33a1406ba4f3ec55aab5995c12eba1694de31bf76d960dfd1961649989ccda
@@ -189,12 +189,6 @@ static void mm_free(mm_ipc *i_mm) {
189
189
  }
190
190
 
191
191
  if (i_mm->t->path != (char *)-1) {
192
- if (i_mm->t->real < i_mm->t->len && i_mm->t->vscope != MAP_PRIVATE &&
193
- truncate(i_mm->t->path, i_mm->t->real) == -1) {
194
- free(i_mm->t->path);
195
- free(i_mm);
196
- rb_raise(rb_eTypeError, "truncate");
197
- }
198
192
  free(i_mm->t->path);
199
193
  }
200
194
  }
@@ -414,10 +408,6 @@ VALUE mm_unmap(VALUE obj) {
414
408
  }
415
409
 
416
410
  if (i_mm->t->path != (char *)-1) {
417
- if (i_mm->t->real < i_mm->t->len && i_mm->t->vscope != MAP_PRIVATE &&
418
- truncate(i_mm->t->path, i_mm->t->real) == -1) {
419
- rb_raise(rb_eTypeError, "truncate");
420
- }
421
411
  free(i_mm->t->path);
422
412
  }
423
413
 
@@ -224,16 +224,6 @@ impl InnerMmap {
224
224
  }
225
225
  }
226
226
 
227
- /// Truncate the mmapped file to the end of the metrics data.
228
- pub fn truncate_file(&mut self) -> Result<()> {
229
- // CAST: no-op on 64-bit, widening on 32-bit.
230
- let trunc_len = self.len as u64;
231
-
232
- self.file
233
- .set_len(trunc_len)
234
- .map_err(|e| MmapError::legacy(format!("truncate: {e}"), RubyError::Type))
235
- }
236
-
237
227
  /// Load the `used` header containing the size of the metrics data written.
238
228
  pub fn load_used(&self) -> Result<u32> {
239
229
  match read_u32(self.map.as_ref(), 0) {
@@ -225,9 +225,6 @@ impl MmapedFile {
225
225
  let rs_self = &*rb_self;
226
226
 
227
227
  rs_self.inner_mut(|inner| {
228
- // truncate file to actual used size
229
- inner.truncate_file()?;
230
-
231
228
  // We are about to release the backing mmap for Ruby's String
232
229
  // objects. If Ruby attempts to read from them the program will
233
230
  // segfault. We update the length of all Strings to zero so Ruby
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  module Prometheus
2
2
  module Client
3
- VERSION = '0.28.0'.freeze
3
+ VERSION = '0.28.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus-client-mmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.28.1
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Tobias Schmidt
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-09-02 00:00:00.000000000 Z
14
+ date: 2023-10-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rb_sys