querysub 0.700.0 → 0.701.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.700.0",
3
+ "version": "0.701.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -41,6 +41,8 @@ function createSourceWindows(
41
41
 
42
42
  function archiveBuilder(bucket: string, overrides: Partial<RemoteConfigBase>) {
43
43
  const ONTARIO = `https://99-250-124-91.querysubtest.com:5234/file/${STORAGE_ACCOUNT}/${bucket}/storage/storagerouting.json`;
44
+ // NOTE: This is on an overly large extra disk that's on our 4090 machine. I prefer to not use it because it might slow down diffusion, but it's quite large (2tb, and diffusion will never use more than 1tb), so we could use it if we needed to.
45
+ const ONTARIO2 = `https://99-250-124-91.querysubtest.com:5235/file/${STORAGE_ACCOUNT}/${bucket}/storage/storagerouting.json`;
44
46
  const HETZNER = `https://65-109-93-113.querysubtest.com:5234/file/${STORAGE_ACCOUNT}/${bucket}/storage/storagerouting.json`;
45
47
  const BACKBLAZE = `https://f002.backblazeb2.com/file/${bucket}/storage/storagerouting.json`;
46
48
 
@@ -76,6 +78,12 @@ function archiveBuilder(bucket: string, overrides: Partial<RemoteConfigBase>) {
76
78
  // NOTE: Once we add new sources, we need to add something at a new start time in the future so we have time to move the files.
77
79
  // TODO: EVENTUALLY, Once we have enough data, instead of restriping, we need to bisect the data. That way we can slowly move over the data instead of trying to rewrite all of our data all at once. However, for the moment, moving all the data is probably fine. On the data center, we should be able to move terabytes of data every hour, so we should be able to handle quite a bit, especially if we have a few days to run the restriping.
78
80
  // IMPORTANT! Every time we re-stripe, we need to increment the route version. Otherwise, we could reuse a folder that we previously used that's no longer in sync. which will cause us to resurrect old data, which is very bad. We don't want to do that...
81
+ // NOTE: We do full redundancy, so if the ranges are a, b, c, then its:
82
+ // s0=a s1=b s2=c
83
+ // s0=c s1=a s2=b
84
+ // s0=b s1=c s2=a
85
+ // Essentially, we just shift it every time. So every server has all the data, But the primary writers are divided between all the servers.
86
+ // (If you follow A, you can see it's diagonal, B is diagonal, they're all diagonal, like stripes).
79
87
  ...stripeSources([ONTARIO, HETZNER], { routeVersion: 2 }),
80
88
  { type: "backblaze", url: BACKBLAZE, name: "backblaze" },
81
89
  ]
@@ -83,7 +91,7 @@ function archiveBuilder(bucket: string, overrides: Partial<RemoteConfigBase>) {
83
91
  ]);
84
92
 
85
93
  return createArchives({
86
- version: 28,
94
+ version: 29,
87
95
  sources,
88
96
  });
89
97
  }
@@ -93,12 +93,12 @@ const getDiskInfos = measureWrap(async function getDiskInfos(): Promise<DiskInfo
93
93
  }
94
94
  disks.push({ device, mountPoint, value, max });
95
95
  }
96
+ sort(disks, disk => -disk.max);
96
97
  let large = disks.filter(disk => disk.max >= LARGE_DISK_MIN_BYTES);
97
- if (large.length > 0) {
98
- disks = large;
98
+ if (large.length === 0) {
99
+ large = disks.slice(0, 1);
99
100
  }
100
- sort(disks, disk => -disk.max);
101
- return disks;
101
+ return large;
102
102
  } catch (e: any) {
103
103
  console.warn(`Error getting disk info: ${e.stack}`);
104
104
  }