bootsnap 1.1.6-java → 1.1.7-java

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
  SHA1:
3
- metadata.gz: 83d81136127e353b9707007de28cda32978abfab
4
- data.tar.gz: ccfa356d26674743a55c1dbcd797356363dc2927
3
+ metadata.gz: 7a5f10f537a39d959ca44add8ad51a7462fe90bf
4
+ data.tar.gz: 4ca0d0257a071a636f5631c45e56070fd24b5380
5
5
  SHA512:
6
- metadata.gz: 7e288dbca937cf5486423fb21857a7a23d9f0788af5879134dbc01ff469ba01781cef7da3711937412f997ca83a5e5b5ff3c7ab819c4bf25fdbf2df75e8ca8d6
7
- data.tar.gz: 5a53523989729d26dc67eb579e2fef3f21f4f3da427b6cb982452ba090aee7c608bdcbb6fe13514d22e003cd66341786c8eee5fa3bac5723b378a69338af8f9f
6
+ metadata.gz: 29ebf046d14780e75792abf63960b2b0232a8b1fce5d0405b556b15e317e79a6833af032575b733877ffb039928e284884da1d3721a861f9f6fac976ca63a2e2
7
+ data.tar.gz: 67c4a9238bac9ec0e38ec040cbfc7c1c3b92dfa1ccdaa328315d932795efbab525666d7e9ca7d3bb4f2391b2b0dda95c3b35216092f1f5000fafff344c0e2444
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.1.7
2
+
3
+ * Create cache entries as 0775/0664 instead of 0755/0644
4
+ * Better handling around cache updates in highly-parallel workloads
5
+
1
6
  # 1.1.6
2
7
 
3
8
  * Assortment of minor bugfixes
@@ -476,13 +476,13 @@ atomic_write_cache_file(char * path, struct bs_cache_key * key, VALUE data, char
476
476
  strcat(dest, ".tmp.XXXXXX");
477
477
 
478
478
  tmp_path = mktemp(template);
479
- fd = open(tmp_path, O_WRONLY | O_CREAT, 0644);
479
+ fd = open(tmp_path, O_WRONLY | O_CREAT, 0664);
480
480
  if (fd < 0) {
481
- if (mkpath(path, 0755) < 0) {
481
+ if (mkpath(path, 0775) < 0) {
482
482
  *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:mkpath";
483
483
  return -1;
484
484
  }
485
- fd = open(tmp_path, O_WRONLY | O_CREAT, 0644);
485
+ fd = open(tmp_path, O_WRONLY | O_CREAT, 0664);
486
486
  if (fd < 0) {
487
487
  *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:open";
488
488
  return -1;
@@ -71,8 +71,11 @@ module Bootsnap
71
71
  # caches if they read at an inopportune time.
72
72
  tmp = "#{@store_path}.#{Process.pid}.#{(rand * 100000).to_i}.tmp"
73
73
  FileUtils.mkpath(File.dirname(tmp))
74
- File.binwrite(tmp, MessagePack.dump(@data))
74
+ exclusive_write = File::Constants::CREAT | File::Constants::EXCL | File::Constants::WRONLY
75
+ File.binwrite(tmp, MessagePack.dump(@data), mode: exclusive_write)
75
76
  FileUtils.mv(tmp, @store_path)
77
+ rescue Errno::EEXIST
78
+ retry
76
79
  end
77
80
  end
78
81
  end
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: java
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2017-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement