refactor js sdk # ng-sdk setup #2 (rm most of ldo)

refactor
Laurin Weger 1 day ago
parent 6fe938d001
commit 1ec3241097
No known key found for this signature in database
GPG Key ID: 9B372BB0B792770F
  1. 6
      package.json
  2. 9416
      pnpm-lock.yaml
  3. 9
      pnpm-workspace.yaml
  4. 0
      scripts/fix-ldo-dataset-cjs.js
  5. 1
      sdk/ng-sdk-js/.gitignore
  6. 11452
      sdk/ng-sdk-js/examples/multi-framework-signals/package-lock.json
  7. 10
      sdk/ng-sdk-js/examples/multi-framework-signals/package.json
  8. 2
      sdk/ng-sdk-js/examples/multi-framework-signals/src/app/components/ReactRoot.tsx
  9. 2
      sdk/ng-sdk-js/examples/multi-framework-signals/src/app/components/SvelteRoot.svelte
  10. 3
      sdk/ng-sdk-js/examples/multi-framework-signals/src/app/components/VueRoot.vue
  11. 2
      sdk/ng-sdk-js/examples/multi-framework-signals/src/app/pages/index.astro
  12. 77
      sdk/ng-sdk-js/examples/multi-framework-signals/src/frontends/react/HelloWorld.tsx
  13. 4
      sdk/ng-sdk-js/examples/multi-framework-signals/src/frontends/svelte/HelloWorld.svelte
  14. 6
      sdk/ng-sdk-js/examples/multi-framework-signals/src/frontends/vue/HelloWorld.vue
  15. 5
      sdk/ng-sdk-js/examples/multi-framework-signals/src/ng-mock/tests/applyDiff.test.ts
  16. 2
      sdk/ng-sdk-js/examples/multi-framework-signals/src/ng-mock/tests/updatesWithWasm.test.ts
  17. 141
      sdk/ng-sdk-js/examples/multi-framework-signals/src/ng-mock/wasm-land/shapeHandler.ts
  18. 9
      sdk/ng-sdk-js/examples/multi-framework-signals/src/ng-mock/wasm-land/types.ts
  19. 12
      sdk/ng-sdk-js/examples/multi-framework-signals/src/shapes/ldo/catShape.schema.ts
  20. 6
      sdk/ng-sdk-js/examples/multi-framework-signals/src/shapes/ldo/catShape.shapeTypes.ts
  21. 12
      sdk/ng-sdk-js/examples/multi-framework-signals/src/shapes/ldo/personShape.schema.ts
  22. 6
      sdk/ng-sdk-js/examples/multi-framework-signals/src/shapes/ldo/personShape.shapeTypes.ts
  23. 18
      sdk/ng-sdk-js/examples/multi-framework-signals/src/shapes/ldo/testShape.schema.ts
  24. 6
      sdk/ng-sdk-js/examples/multi-framework-signals/src/shapes/ldo/testShape.shapeTypes.ts
  25. 8
      sdk/ng-sdk-js/examples/multi-framework-signals/tsconfig.json
  26. 10
      sdk/ng-sdk-js/ng-alien-deepsignals/README.md
  27. 16
      sdk/ng-sdk-js/ng-alien-deepsignals/package.json
  28. 26
      sdk/ng-sdk-js/ng-alien-deepsignals/tsconfig.json
  29. 38
      sdk/ng-sdk-js/ng-ldo-compact/.eslintrc
  30. 22
      sdk/ng-sdk-js/ng-ldo-compact/.gitignore
  31. 4
      sdk/ng-sdk-js/ng-ldo-compact/.vscode/settings.json
  32. 21
      sdk/ng-sdk-js/ng-ldo-compact/LICENSE.txt
  33. 30
      sdk/ng-sdk-js/ng-ldo-compact/Readme.md
  34. 30
      sdk/ng-sdk-js/ng-ldo-compact/jest.config.js
  35. 31
      sdk/ng-sdk-js/ng-ldo-compact/jest.esm.config.js
  36. 4
      sdk/ng-sdk-js/ng-ldo-compact/lerna.json
  37. 48778
      sdk/ng-sdk-js/ng-ldo-compact/package-lock.json
  38. 39
      sdk/ng-sdk-js/ng-ldo-compact/package.json
  39. 3
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/.eslintrc
  40. 2
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/.gitignore
  41. 21
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/LICENSE.txt
  42. 83
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/README.md
  43. 11
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/example-init-placeholder/package.json
  44. 1
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/example-init-placeholder/src/index.ts
  45. 6
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/jest.config.cjs
  46. 96
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/build.ts
  47. 119
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/create.ts
  48. 107
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/generateReadme.ts
  49. 58
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/index.ts
  50. 78
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/init.ts
  51. 8
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/context.ejs
  52. 19
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/defaultShapes/foafProfile.ejs
  53. 15
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/readme/main.ejs
  54. 2
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/readme/projectIndex.ejs
  55. 27
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/readme/shape.ejs
  56. 8
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/schema.compact.ejs
  57. 8
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/schema.ejs
  58. 16
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/shapeTypes.ejs
  59. 18
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/templates/typings.ejs
  60. 78
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/util/forAllShapes.ts
  61. 33
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/src/util/modifyPackageJson.ts
  62. 5
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/test/trivial.test.ts
  63. 9
      sdk/ng-sdk-js/ng-ldo-compact/packages/cli/tsconfig.cjs.json
  64. 3
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/.eslintrc
  65. 2
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/.gitignore
  66. 21
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/LICENSE.txt
  67. 186
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/README.md
  68. 73
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/package.json
  69. 87
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/NextGraphConnectedPlugin.ts
  70. 13
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/createNextGraphLdoDataset.ts
  71. 10
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/index.ts
  72. 15
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/notifications/NextGraphNotificationMessage.ts
  73. 23
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/notifications/NextGraphNotificationSubscription.ts
  74. 270
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/resources/NextGraphResource.ts
  75. 6
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/results/NextGraphReadSuccess.ts
  76. 8
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/types.ts
  77. 15
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/util/NextGraphNotificationMessage.ts
  78. 10
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/src/util/isNextGraphUri.ts
  79. 162
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/integration.test.ts
  80. 1
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/key
  81. 1
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/peer
  82. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/000004.log
  83. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/000010.sst
  84. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/000011.log
  85. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/000017.sst
  86. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/000018.log
  87. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/000024.log
  88. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/CURRENT
  89. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/IDENTITY
  90. 343
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/LOG
  91. 300
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/LOG.old.1743346494643102
  92. 343
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/LOG.old.1743347058134969
  93. 305
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/LOG.old.1743347087344217
  94. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/MANIFEST-000025
  95. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/OPTIONS-000027
  96. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/accounts/OPTIONS-000029
  97. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/blocks/000004.log
  98. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/blocks/000010.sst
  99. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/blocks/000011.blob
  100. BIN
      sdk/ng-sdk-js/ng-ldo-compact/packages/connected-nextgraph/test/nextgraph-data-backup/server/storage/blocks/000012.log
  101. Some files were not shown because too many files have changed in this diff Show More

@ -2,6 +2,7 @@
"name": "nextgraph-monorepo", "name": "nextgraph-monorepo",
"private": true, "private": true,
"version": "0.1.2", "version": "0.1.2",
"scripts": {},
"pnpm": { "pnpm": {
"peerDependencyRules": { "peerDependencyRules": {
"ignoreMissing": [ "ignoreMissing": [
@ -11,5 +12,8 @@
} }
}, },
"devDependencies": { "devDependencies": {
} "prettier": "^3.6.2",
"prettier-plugin-svelte": "^3.4.0"
},
"packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b"
} }

File diff suppressed because it is too large Load Diff

@ -3,10 +3,15 @@ packages:
- sdk/ng-sdk-js/ng-signals - sdk/ng-sdk-js/ng-signals
- sdk/ng-sdk-js/ng-alien-deepsignals - sdk/ng-sdk-js/ng-alien-deepsignals
- sdk/ng-sdk-js/ng-ldo-compact - sdk/ng-sdk-js/ng-ldo-compact
- sdk/ng-sdk-js/ng-ldo-compact/packages/cli
- sdk/ng-sdk-js/ng-ldo-compact/packages/ldo
- sdk/ng-sdk-js/ng-ldo-compact/packages/schema-converter-shex
- sdk/ng-sdk-js/ng-ldo-compact/packages/traverser-shexj
- sdk/ng-sdk-js/ng-shex-orm
- sdk/ng-sdk-js/examples/multi-framework-signals - sdk/ng-sdk-js/examples/multi-framework-signals
onlyBuiltDependencies: onlyBuiltDependencies:
- '@parcel/watcher' - "@parcel/watcher"
- '@swc/core' - "@swc/core"
- es5-ext - es5-ext
- esbuild - esbuild
- svelte-preprocess - svelte-preprocess

@ -1,3 +1,4 @@
pkg/* pkg/*
pkg-node/* pkg-node/*
web/* web/*
dist/

File diff suppressed because it is too large Load Diff

@ -10,10 +10,11 @@
"preview": "astro preview", "preview": "astro preview",
"astro": "astro", "astro": "astro",
"test": "vitest", "test": "vitest",
"test:e2e": "playwright test" "test:e2e": "playwright test",
"build:shapes": "ldo build --input ./src/shapes/shex --output ./src/shapes/ldo"
}, },
"dependencies": { "dependencies": {
"ng-signals": "0.1.0", "@nextgraph-monorepo/ng-signals": "workspace:*",
"@astrojs/react": "4.3.0", "@astrojs/react": "4.3.0",
"@astrojs/svelte": "7.1.0", "@astrojs/svelte": "7.1.0",
"@astrojs/vue": "^5.1.0", "@astrojs/vue": "^5.1.0",
@ -21,11 +22,11 @@
"@gn8/alien-signals-solid": "^0.1.1", "@gn8/alien-signals-solid": "^0.1.1",
"@gn8/alien-signals-svelte": "^0.1.1", "@gn8/alien-signals-svelte": "^0.1.1",
"@gn8/alien-signals-vue": "^0.1.1", "@gn8/alien-signals-vue": "^0.1.1",
"@ldo/ldo": "^1.0.0-alpha.32", "@nextgraph-monorepo/ng-alien-deepsignals": "workspace:*",
"@nextgraph-monorepo/ng-shex-orm": "workspace:*",
"@types/react": "19.1.10", "@types/react": "19.1.10",
"@types/react-dom": "19.1.7", "@types/react-dom": "19.1.7",
"@types/shexj": "^2.1.7", "@types/shexj": "^2.1.7",
"ng-alien-deepsignals": "^0.1.0",
"alien-signals": "^2.0.7", "alien-signals": "^2.0.7",
"astro": "5.13.2", "astro": "5.13.2",
"install": "^0.13.0", "install": "^0.13.0",
@ -37,7 +38,6 @@
"vue": "3.5.19" "vue": "3.5.19"
}, },
"devDependencies": { "devDependencies": {
"@ldo/traverser-shexj": "^1.0.0-alpha.28",
"@playwright/test": "^1.55.0", "@playwright/test": "^1.55.0",
"@types/node": "24.3.0", "@types/node": "24.3.0",
"@types/react": "19.1.10", "@types/react": "19.1.10",

@ -1,4 +1,4 @@
import { HelloWorldReact } from "src/frontends/react/HelloWorld"; import { HelloWorldReact } from "../../frontends/react/HelloWorld";
const Root = () => { const Root = () => {
return <HelloWorldReact />; return <HelloWorldReact />;

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import HelloWorld from "src/frontends/svelte/HelloWorld.svelte"; import HelloWorld from "../../frontends/svelte/HelloWorld.svelte";
</script> </script>
<HelloWorld /> <HelloWorld />

@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import HelloWorld from 'src/frontends/vue/HelloWorld.vue'; import HelloWorld from '../../frontends/vue/HelloWorld.vue';
// //
</script> </script>

@ -5,6 +5,8 @@ import Highlight from "../components/Highlight.astro";
import VueRoot from "../components/VueRoot.vue"; import VueRoot from "../components/VueRoot.vue";
import ReactRoot from "../components/ReactRoot"; import ReactRoot from "../components/ReactRoot";
import SvelteRoot from "../components/SvelteRoot.svelte"; import SvelteRoot from "../components/SvelteRoot.svelte";
// Hack to get mock backend started
import { mockTestObject } from "../../ng-mock/wasm-land/shapeHandler";
const title = "Multi-framework app"; const title = "Multi-framework app";
--- ---

@ -1,7 +1,10 @@
import React from "react"; import React from "react";
import useShape from "ng-signals/frontendAdapters/react/useShape"; import { useShape } from "@nextgraph-monorepo/ng-signals/react";
import flattenObject from "../utils/flattenObject"; import flattenObject from "../utils/flattenObject";
import { TestObjectShapeType } from "src/shapes/ldo/testShape.shapeTypes"; import { TestObjectShapeType } from "../../shapes/ldo/testShape.shapeTypes";
// Hack to get mock backend started
import { mockTestObject } from "../../ng-mock/wasm-land/shapeHandler";
export function HelloWorldReact() { export function HelloWorldReact() {
const state = useShape(TestObjectShapeType); const state = useShape(TestObjectShapeType);
@ -36,7 +39,11 @@ export function HelloWorldReact() {
</thead> </thead>
<tbody> <tbody>
{(() => { {(() => {
const setNestedValue = (obj: any, path: string, value: any) => { const setNestedValue = (
obj: any,
path: string,
value: any
) => {
const keys = path.split("."); const keys = path.split(".");
let current = obj; let current = obj;
@ -69,7 +76,11 @@ export function HelloWorldReact() {
type="text" type="text"
value={value} value={value}
onChange={(e) => { onChange={(e) => {
setNestedValue(state, key, e.target.value); setNestedValue(
state,
key,
e.target.value
);
}} }}
/> />
) : typeof value === "number" ? ( ) : typeof value === "number" ? (
@ -77,7 +88,11 @@ export function HelloWorldReact() {
type="number" type="number"
value={value} value={value}
onChange={(e) => { onChange={(e) => {
setNestedValue(state, key, Number(e.target.value)); setNestedValue(
state,
key,
Number(e.target.value)
);
}} }}
/> />
) : typeof value === "boolean" ? ( ) : typeof value === "boolean" ? (
@ -85,14 +100,22 @@ export function HelloWorldReact() {
type="checkbox" type="checkbox"
checked={value} checked={value}
onChange={(e) => { onChange={(e) => {
setNestedValue(state, key, e.target.checked); setNestedValue(
state,
key,
e.target.checked
);
}} }}
/> />
) : Array.isArray(value) ? ( ) : Array.isArray(value) ? (
<div> <div>
<button <button
onClick={() => { onClick={() => {
const currentArray = getNestedValue(state, key); const currentArray =
getNestedValue(
state,
key
);
setNestedValue(state, key, [ setNestedValue(state, key, [
...currentArray, ...currentArray,
currentArray.length + 1, currentArray.length + 1,
@ -103,12 +126,21 @@ export function HelloWorldReact() {
</button> </button>
<button <button
onClick={() => { onClick={() => {
const currentArray = getNestedValue(state, key); const currentArray =
if (currentArray.length > 0) { getNestedValue(
state,
key
);
if (
currentArray.length > 0
) {
setNestedValue( setNestedValue(
state, state,
key, key,
currentArray.slice(0, -1) currentArray.slice(
0,
-1
)
); );
} }
}} }}
@ -120,18 +152,33 @@ export function HelloWorldReact() {
<div> <div>
<button <button
onClick={() => { onClick={() => {
const currentSet = getNestedValue(state, key); const currentSet =
currentSet.add(`item${currentSet.size + 1}`); getNestedValue(
state,
key
);
currentSet.add(
`item${currentSet.size + 1}`
);
}} }}
> >
Add Add
</button> </button>
<button <button
onClick={() => { onClick={() => {
const currentSet = getNestedValue(state, key); const currentSet =
const lastItem = Array.from(currentSet).pop(); getNestedValue(
state,
key
);
const lastItem =
Array.from(
currentSet
).pop();
if (lastItem) { if (lastItem) {
currentSet.delete(lastItem); currentSet.delete(
lastItem
);
} }
}} }}
> >

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { TestObjectShapeType } from "src/shapes/ldo/testShape.shapeTypes"; import { TestObjectShapeType } from "../../shapes/ldo/testShape.shapeTypes";
import useShape from "ng-signals/frontendAdapters/svelte/useShape.svelte"; import { useShape } from "@nextgraph-monorepo/ng-signals/svelte";
import flattenObject from "../utils/flattenObject"; import flattenObject from "../utils/flattenObject";
const shapeObject = useShape(TestObjectShapeType); const shapeObject = useShape(TestObjectShapeType);

@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { computed } from 'vue';
import useShape from 'ng-signals/frontendAdapters/vue/useShape'; import { useShape } from "@nextgraph-monorepo/ng-signals/vue";
import flattenObject from '../utils/flattenObject'; import flattenObject from '../utils/flattenObject';
import { TestObjectShapeType } from 'src/shapes/ldo/testShape.shapeTypes'; import { TestObjectShapeType } from "../../shapes/ldo/testShape.shapeTypes";
// Acquire deep signal object (proxy) for a shape; scope second arg left empty string for parity // Acquire deep signal object (proxy) for a shape; scope second arg left empty string for parity
const shapeObj = useShape(TestObjectShapeType); const shapeObj = useShape(TestObjectShapeType);
@ -20,7 +20,7 @@ const flatEntries = computed(() => flattenObject(shapeObj));
<div class="vue"> <div class="vue">
<p>Rendered in Vue</p> <p>Rendered in Vue</p>
<template v-if="shapeObj && shapeObj.type"> <template v-if="shapeObj && 'type' in shapeObj">
<!-- Direct property access --> <!-- Direct property access -->
<input type="text" v-model="shapeObj.type" /> <input type="text" v-model="shapeObj.type" />
<input type="text" v-model="shapeObj.objectValue.nestedString" /> <input type="text" v-model="shapeObj.objectValue.nestedString" />

@ -1,9 +1,8 @@
import { describe, test, expect } from "vitest"; import { describe, test, expect } from "vitest";
import { import {
applyDiff, applyDiff,
applyDiffToDeepSignal, } from "@nextgraph-monorepo/ng-signals";
} from "ng-signals/connector/applyDiff"; import type { Patch } from "@nextgraph-monorepo/ng-signals";
import type { Patch } from "ng-signals/connector/applyDiff";
/** /**
* Build a patch path string from segments (auto-prefix /) * Build a patch path string from segments (auto-prefix /)

@ -1,5 +1,5 @@
import { describe, expect, test } from "vitest"; import { describe, expect, test } from "vitest";
import { createSignalObjectForShape } from "ng-signals/connector/createSignalObjectForShape.ts"; import { createSignalObjectForShape } from "@nextgraph-monorepo/ng-signals";
const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

@ -1,9 +1,9 @@
import * as shapeManager from "./shapeManager"; import * as shapeManager from "./shapeManager";
import type { WasmConnection, Diff, Scope } from "./types"; import type { WasmConnection, Diff, Scope } from "./types";
import type { CompactShapeType, LdoCompactBase } from "@ldo/ldo"; import type { ShapeType, OrmBase } from "@nextgraph-monorepo/ng-shex-orm";
import type { Person } from "src/shapes/ldo/personShape.typings"; import type { Person } from "../../shapes/ldo/personShape.typings";
import type { Cat } from "src/shapes/ldo/catShape.typings"; import type { Cat } from "../../shapes/ldo/catShape.typings";
import type { TestObject } from "src/shapes/ldo/testShape.typings"; import type { TestObject } from "../../shapes/ldo/testShape.typings";
import updateShape from "./updateShape"; import updateShape from "./updateShape";
// Messages exchanged over the BroadcastChannel("shape-manager") // Messages exchanged over the BroadcastChannel("shape-manager")
@ -16,8 +16,8 @@ interface WasmMessage {
| "Stop"; | "Stop";
connectionId: string; connectionId: string;
diff?: Diff; diff?: Diff;
schema?: CompactShapeType<any>["schema"]; shapeType?: ShapeType<any>;
initialData?: LdoCompactBase; initialData?: OrmBase;
} }
export const mockTestObject = { export const mockTestObject = {
@ -31,6 +31,7 @@ export const mockTestObject = {
id: "urn:obj-1", id: "urn:obj-1",
nestedString: "nested", nestedString: "nested",
nestedNum: 7, nestedNum: 7,
nestedArray: [10, 12], nestedArray: [10, 12],
}, },
anotherObject: { anotherObject: {
@ -77,15 +78,13 @@ const mockShapeObject2 = {
// Single BroadcastChannel for wasm-land side // Single BroadcastChannel for wasm-land side
const communicationChannel = new BroadcastChannel("shape-manager"); const communicationChannel = new BroadcastChannel("shape-manager");
function getInitialObjectByShapeId<T extends LdoCompactBase>( function getInitialObjectByShapeId<T extends OrmBase>(shapeId?: string): T {
shapeId?: string,
): T {
if (shapeId?.includes("TestObject")) return mockTestObject as unknown as T; if (shapeId?.includes("TestObject")) return mockTestObject as unknown as T;
if (shapeId?.includes("Person")) return mockShapeObject1 as unknown as T; if (shapeId?.includes("Person")) return mockShapeObject1 as unknown as T;
if (shapeId?.includes("Cat")) return mockShapeObject2 as unknown as T; if (shapeId?.includes("Cat")) return mockShapeObject2 as unknown as T;
console.warn( console.warn(
"BACKEND: requestShape for unknown shape, returning empty object.", "BACKEND: requestShape for unknown shape, returning empty object.",
shapeId, shapeId
); );
return {} as T; return {} as T;
} }
@ -95,10 +94,10 @@ communicationChannel.addEventListener(
"message", "message",
(event: MessageEvent<WasmMessage>) => { (event: MessageEvent<WasmMessage>) => {
console.log("BACKEND: Received message", event.data); console.log("BACKEND: Received message", event.data);
const { type, connectionId, schema } = event.data; const { type, connectionId, shapeType } = event.data;
if (type === "Request") { if (type === "Request") {
const shapeId = schema?.shapes?.[0]?.id; const shapeId = shapeType?.shape;
const initialData = getInitialObjectByShapeId(shapeId); const initialData = getInitialObjectByShapeId(shapeId);
// Store connection. We store the shapeId string to allow equality across connections. // Store connection. We store the shapeId string to allow equality across connections.
@ -137,119 +136,9 @@ communicationChannel.addEventListener(
return; return;
} }
console.warn("BACKEND: Unknown message type or missing diff", event.data); console.warn(
}, "BACKEND: Unknown message type or missing diff",
); event.data
// Keep the original function for compatibility with any direct callers.
let connectionIdCounter = 1;
export default async function requestShape<T extends LdoCompactBase>(
shape: CompactShapeType<T>,
_scope: Scope | undefined,
callback: (diff: Diff, connectionId: WasmConnection["id"]) => void,
): Promise<{ connectionId: string; shapeObject: T }> {
const connectionId = `connection-${connectionIdCounter++}-${shape.schema.shapes?.[0]?.id}`;
const shapeId = shape.schema.shapes?.[0]?.id;
const shapeObject = getInitialObjectByShapeId<T>(shapeId);
shapeManager.connections.set(connectionId, {
id: connectionId,
shape: (shapeId ?? "__unknown__") as any,
state: shapeObject,
callback,
});
return { connectionId, shapeObject };
}
const getObjectsForShapeType = <T extends LdoCompactBase>(
shape: CompactShapeType<T>,
scope: string = "",
): T[] => {
// Procedure
// - Get all triples for the scope
// - Parse the schema (all shapes and anonymous shapes required for the shape type).
// - Group triples by subject
// - For the shapeType in the schema, match all required predicates
// - For predicates pointing to nested objects
// - recurse
// Repeat procedure for all matched subjects with optional predicates
const quads: [
string,
string,
number | string | boolean,
string | undefined,
][] = [];
// The URI of the shape to find matches for.
const schemaId = shape.shape;
// ShexJ shape object
const rootShapeDecl = shape.schema.shapes?.find(
(shape) => shape.id === schemaId,
); );
if (!rootShapeDecl)
throw new Error(`Could not find shape id ${schemaId} in shape schema`);
if (rootShapeDecl.shapeExpr.type !== "Shape")
throw new Error("Expected shapeExpr.type to be Shape");
const shapeExpression = rootShapeDecl.shapeExpr.expression;
// If shape is a reference...
if (typeof shapeExpression === "string") {
// TODO: Recurse
return [];
}
const requiredPredicates = [];
const optionalPredicates = [];
if (shapeExpression?.type === "EachOf") {
const predicates = shapeExpression.expressions.map((constraint) => {
if (typeof constraint === "string") {
// Cannot parse constraint refs
return;
} else if (constraint.type === "TripleConstraint") {
requiredPredicates.push({
predicate: constraint.predicate,
});
} else {
// EachOf or OneOf possible?
}
});
} else if (shapeExpression?.type === "OneOf") {
// Does not occur AFAIK.
} else if (shapeExpression?.type === "TripleConstraint") {
// Does not occur AFAIK.
} }
);
return [];
};
interface ShapeConstraintTracked {
subject: string;
childOf?: ShapeConstraintTracked;
predicates: [
{
displayName: string;
uri: string;
type: "number" | "string" | "boolean" | "nested" | "literal";
literalValue?: number | string | boolean | number[] | string[];
nested?: ShapeConstraintTracked;
min: number;
max: number;
currentCount: number;
},
];
}
// Group by subject, check predicates of root level
// For all subjects of root level,
// - recurse
// Construct matching subjects
// for each optional and non-optional predicate
// - fill objects and record
// - build tracked object (keeping reference counts to check if the object is still valid)

@ -1,6 +1,5 @@
import type { CompactShapeType, LdoCompactBase } from "@ldo/ldo"; import type { ShapeType, OrmBase } from "@nextgraph-monorepo/ng-shex-orm";
import type { Patch } from "ng-signals/connector/applyDiff"; import type { Patch } from "@nextgraph-monorepo/ng-signals";
import type { Shape } from "ng-signals/types";
/** The Scope of a shape request */ /** The Scope of a shape request */
export type Scope = string | string[]; export type Scope = string | string[];
@ -11,9 +10,9 @@ export type Diff = Patch[];
export type ObjectState = object; export type ObjectState = object;
/** A connection established between wasm-land and js-land for subscription of a shape. */ /** A connection established between wasm-land and js-land for subscription of a shape. */
export type WasmConnection<T extends LdoCompactBase = LdoCompactBase> = { export type WasmConnection<T extends OrmBase = OrmBase> = {
id: string; id: string;
shape: CompactShapeType<T>; shape: ShapeType<T>;
state: ObjectState; state: ObjectState;
callback: (diff: Diff, connectionId: WasmConnection["id"]) => void; callback: (diff: Diff, connectionId: WasmConnection["id"]) => void;
}; };

@ -1,11 +1,11 @@
import type { CompactSchema } from "@ldo/ldo"; import type { Schema } from "@nextgraph-monorepo/ng-shex-orm";
/** /**
* ============================================================================= * =============================================================================
* catShapeSchema: Compact Schema for catShape * catShapeSchema: Schema for catShape
* ============================================================================= * =============================================================================
*/ */
export const catShapeSchema: CompactSchema = { export const catShapeSchema: Schema = {
"http://example.org/Cat": { "http://example.org/Cat": {
iri: "http://example.org/Cat", iri: "http://example.org/Cat",
predicates: [ predicates: [
@ -40,7 +40,7 @@ export const catShapeSchema: CompactSchema = {
}, },
{ {
type: "nested", type: "nested",
nestedSchema: "http://example.org/Cat::http://example.org/address", nestedSchema: "http://example.org/Cat||http://example.org/address",
maxCardinality: 1, maxCardinality: 1,
minCardinality: 1, minCardinality: 1,
predicateUri: "http://example.org/address", predicateUri: "http://example.org/address",
@ -48,8 +48,8 @@ export const catShapeSchema: CompactSchema = {
}, },
], ],
}, },
"http://example.org/Cat::http://example.org/address": { "http://example.org/Cat||http://example.org/address": {
iri: "http://example.org/Cat::http://example.org/address", iri: "http://example.org/Cat||http://example.org/address",
predicates: [ predicates: [
{ {
type: "string", type: "string",

@ -1,9 +1,9 @@
import type { CompactShapeType } from "@ldo/ldo"; import type { ShapeType } from "@nextgraph-monorepo/ng-shex-orm";
import { catShapeSchema } from "./catShape.schema"; import { catShapeSchema } from "./catShape.schema";
import type { Cat } from "./catShape.typings"; import type { Cat } from "./catShape.typings";
// Compact ShapeTypes for catShape // ShapeTypes for catShape
export const CatShapeType: CompactShapeType<Cat> = { export const CatShapeType: ShapeType<Cat> = {
schema: catShapeSchema, schema: catShapeSchema,
shape: "http://example.org/Cat", shape: "http://example.org/Cat",
}; };

@ -1,11 +1,11 @@
import type { CompactSchema } from "@ldo/ldo"; import type { Schema } from "@nextgraph-monorepo/ng-shex-orm";
/** /**
* ============================================================================= * =============================================================================
* personShapeSchema: Compact Schema for personShape * personShapeSchema: Schema for personShape
* ============================================================================= * =============================================================================
*/ */
export const personShapeSchema: CompactSchema = { export const personShapeSchema: Schema = {
"http://example.org/Person": { "http://example.org/Person": {
iri: "http://example.org/Person", iri: "http://example.org/Person",
predicates: [ predicates: [
@ -26,7 +26,7 @@ export const personShapeSchema: CompactSchema = {
}, },
{ {
type: "nested", type: "nested",
nestedSchema: "http://example.org/Person::http://example.org/address", nestedSchema: "http://example.org/Person||http://example.org/address",
maxCardinality: 1, maxCardinality: 1,
minCardinality: 1, minCardinality: 1,
predicateUri: "http://example.org/address", predicateUri: "http://example.org/address",
@ -48,8 +48,8 @@ export const personShapeSchema: CompactSchema = {
}, },
], ],
}, },
"http://example.org/Person::http://example.org/address": { "http://example.org/Person||http://example.org/address": {
iri: "http://example.org/Person::http://example.org/address", iri: "http://example.org/Person||http://example.org/address",
predicates: [ predicates: [
{ {
type: "string", type: "string",

@ -1,9 +1,9 @@
import type { CompactShapeType } from "@ldo/ldo"; import type { ShapeType } from "@nextgraph-monorepo/ng-shex-orm";
import { personShapeSchema } from "./personShape.schema"; import { personShapeSchema } from "./personShape.schema";
import type { Person } from "./personShape.typings"; import type { Person } from "./personShape.typings";
// Compact ShapeTypes for personShape // ShapeTypes for personShape
export const PersonShapeType: CompactShapeType<Person> = { export const PersonShapeType: ShapeType<Person> = {
schema: personShapeSchema, schema: personShapeSchema,
shape: "http://example.org/Person", shape: "http://example.org/Person",
}; };

@ -1,11 +1,11 @@
import type { CompactSchema } from "@ldo/ldo"; import type { Schema } from "@nextgraph-monorepo/ng-shex-orm";
/** /**
* ============================================================================= * =============================================================================
* testShapeSchema: Compact Schema for testShape * testShapeSchema: Schema for testShape
* ============================================================================= * =============================================================================
*/ */
export const testShapeSchema: CompactSchema = { export const testShapeSchema: Schema = {
"http://example.org/TestObject": { "http://example.org/TestObject": {
iri: "http://example.org/TestObject", iri: "http://example.org/TestObject",
predicates: [ predicates: [
@ -49,7 +49,7 @@ export const testShapeSchema: CompactSchema = {
{ {
type: "nested", type: "nested",
nestedSchema: nestedSchema:
"http://example.org/TestObject::http://example.org/objectValue", "http://example.org/TestObject||http://example.org/objectValue",
maxCardinality: 1, maxCardinality: 1,
minCardinality: 1, minCardinality: 1,
predicateUri: "http://example.org/objectValue", predicateUri: "http://example.org/objectValue",
@ -58,7 +58,7 @@ export const testShapeSchema: CompactSchema = {
{ {
type: "nested", type: "nested",
nestedSchema: nestedSchema:
"http://example.org/TestObject::http://example.org/anotherObject", "http://example.org/TestObject||http://example.org/anotherObject",
maxCardinality: -1, maxCardinality: -1,
minCardinality: 0, minCardinality: 0,
predicateUri: "http://example.org/anotherObject", predicateUri: "http://example.org/anotherObject",
@ -73,8 +73,8 @@ export const testShapeSchema: CompactSchema = {
}, },
], ],
}, },
"http://example.org/TestObject::http://example.org/objectValue": { "http://example.org/TestObject||http://example.org/objectValue": {
iri: "http://example.org/TestObject::http://example.org/objectValue", iri: "http://example.org/TestObject||http://example.org/objectValue",
predicates: [ predicates: [
{ {
type: "string", type: "string",
@ -99,8 +99,8 @@ export const testShapeSchema: CompactSchema = {
}, },
], ],
}, },
"http://example.org/TestObject::http://example.org/anotherObject": { "http://example.org/TestObject||http://example.org/anotherObject": {
iri: "http://example.org/TestObject::http://example.org/anotherObject", iri: "http://example.org/TestObject||http://example.org/anotherObject",
predicates: [ predicates: [
{ {
type: "string", type: "string",

@ -1,9 +1,9 @@
import type { CompactShapeType } from "@ldo/ldo"; import type { ShapeType } from "@nextgraph-monorepo/ng-shex-orm";
import { testShapeSchema } from "./testShape.schema"; import { testShapeSchema } from "./testShape.schema";
import type { TestObject } from "./testShape.typings"; import type { TestObject } from "./testShape.typings";
// Compact ShapeTypes for testShape // ShapeTypes for testShape
export const TestObjectShapeType: CompactShapeType<TestObject> = { export const TestObjectShapeType: ShapeType<TestObject> = {
schema: testShapeSchema, schema: testShapeSchema,
shape: "http://example.org/TestObject", shape: "http://example.org/TestObject",
}; };

@ -1,10 +1,10 @@
{ {
"extends": "astro/tsconfigs/strict", "extends": ["../../../../tsconfig.base.json", "astro/tsconfigs/strict"],
"compilerOptions": { "compilerOptions": {
"jsx": "react-jsx", "jsx": "react-jsx",
"jsxImportSource": "react", "jsxImportSource": "react",
"baseUrl": "." "rootDir": "src/",
"outDir": "dist/"
}, },
"include": [".astro/types.d.ts", "**/*"], "include": [".astro/types.d.ts", "src/"]
"exclude": ["dist"]
} }

@ -1,4 +1,4 @@
# alien-deepsignals # NextGraph alien-deepsignals
Deep structural reactivity for plain objects / arrays / Sets built on top of `alien-signals`. Deep structural reactivity for plain objects / arrays / Sets built on top of `alien-signals`.
@ -19,15 +19,15 @@ Core idea: wrap a data tree in a `Proxy` that lazily creates per-property signal
## Install ## Install
```bash ```bash
pnpm add alien-deepsignals pnpm add @nextgraph-monorepo/ng-alien-deepsignals
# or # or
npm i alien-deepsignals npm i @nextgraph-monorepo/ng-alien-deepsignals
``` ```
## Quick start ## Quick start
```ts ```ts
import { deepSignal } from 'alien-deepsignals' import { deepSignal } from '@nextgraph-monorepo/ng-alien-deepsignals'
const state = deepSignal({ const state = deepSignal({
count: 0, count: 0,
@ -159,7 +159,7 @@ const n: number = state.$count!() // typed number
## Credits ## Credits
Inspired by [deepsignal](https://github.com/luisherranz/deepsignal) – thanks to @luisherranz. Re-imagined with patch batching & Set support. This project is a fork of https://github.com/CCherry07/alien-deepsignals.
## License ## License

@ -2,25 +2,31 @@
"name": "@nextgraph-monorepo/ng-alien-deepsignals", "name": "@nextgraph-monorepo/ng-alien-deepsignals",
"version": "0.1.0", "version": "0.1.0",
"private": false, "private": false,
"author": "CCherry07", "authors": [
"Laurin Weger",
"CCherry07"
],
"license": "MIT", "license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [ "files": [
"dist" "dist"
], ],
"main": "src/index.ts",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": { "exports": {
".": { ".": {
"import": "./dist/index.mjs", "import": "./dist/index.mjs",
"require": "./dist/index.js" "require": "./dist/index.js"
} }
}
}, },
"description": "AlienDeepSignals 🧶 -alien signals, but using regular JavaScript objects", "description": "AlienDeepSignals 🧶 -alien signals, but using regular JavaScript objects",
"scripts": { "scripts": {
"test": "vitest --coverage", "test": "vitest --coverage",
"dev": "tsup --watch src", "dev": "tsup --watch src",
"build": "tsup", "build:ts": "tsup",
"release": "bumpp && npm run build && npm publish --registry=https://registry.npmjs.org/" "release": "bumpp && npm run build && npm publish --registry=https://registry.npmjs.org/"
}, },
"dependencies": { "dependencies": {

@ -1,25 +1,7 @@
{ {
"extends": "../../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "outDir": "dist/",
"useDefineForClassFields": true, "rootDir": "."
"module": "ESNext", }
"lib": [
"ES2020"
],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": false,
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
},
"include": [
"src"
]
} }

@ -1,38 +0,0 @@
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier",
"react"
],
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
}
}

@ -1,22 +0,0 @@
node_modules/
lerna-debug.log
npm-debug.log
packages/*/dist
.idea
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
coverage/
docs/
.nx

@ -1,4 +0,0 @@
{
"typescript.preferences.importModuleSpecifierEnding": "js",
"javascript.preferences.importModuleSpecifierEnding": "js"
}

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Jackson Morgan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,30 +0,0 @@
# LDO Monorepo
This is a monorepo that contains all libraries associated with Linked Data Objects (LDO).
## Documentation
Full documentation can be found at [ldo.js.org](https://ldo.js.org).
## Libraries
The LDO monorepo contains the following
- [@ldo/cli](./packages/cli/)
- [@ldo/dataset](./packages/dataset/)
- [@ldo/jsonld-dataset-proxy](./packages/jsonld-dataset-proxy/)
- [@ldo/ldo](./packages/ldo/)
- [@ldo/rdf-utils](./packages/rdf-utils/)
- [@ldo/schema-converter-shex](./packages/schema-converter-shex/)
- [@ldo/solid](./packages/solid/)
- [@ldo/solid-react](./packages/solid-react/)
- [@ldo/solid-type-index](./packages/solid-type-index/)
- [@ldo/subscribable-dataset](./packages/subscribable-dataset/)
- [@ldo/traverser-shexj](./packages/traverser-shexj/)
- [@ldo/type-traverser](./packages/type-traverser/)
## Sponsorship
This project was made possible by a grant from NGI Zero Entrust via nlnet. Learn more on the [NLnet project page](https://nlnet.nl/project/SolidUsableApps/).
[<img src="https://nlnet.nl/logo/banner.png" alt="nlnet foundation logo" width="300" />](https://nlnet.nl/)
[<img src="https://nlnet.nl/image/logos/NGI0Entrust_tag.svg" alt="NGI Zero Entrust Logo" width="300" />](https://nlnet.nl/)
## Liscense
MIT

@ -1,30 +0,0 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
const monorepoRoot = path.resolve(__dirname);
module.exports = {
preset: "ts-jest/presets/js-with-ts",
testEnvironment: "node",
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
"^@ldo/([^/]+)$": `${monorepoRoot}/packages/$1/src/index.ts`,
"^@ldo/([^/]+)/(.*)$": `${monorepoRoot}/packages/$1/$2`,
},
coveragePathIgnorePatterns: [
"/node_modules/",
"/dist/",
"/coverage/",
"/test/",
],
transform: {
"^.+\\.ts$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.cjs.json",
},
],
},
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
transformIgnorePatterns: ["/node_modules/", "/dist/"],
modulePathIgnorePatterns: ["/dist/"],
};

@ -1,31 +0,0 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// jest.esm.config.js
const path = require("path");
const monorepoRoot = path.resolve(__dirname);
module.exports = {
preset: "ts-jest/presets/default-esm",
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
transform: {
"^.+\\.ts$": [
"ts-jest",
{
useESM: true,
tsconfig: "<rootDir>/tsconfig.esm.json",
},
],
},
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transformIgnorePatterns: ["/node_modules/", "/dist/"],
modulePathIgnorePatterns: ["/dist/"],
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
coveragePathIgnorePatterns: [
"/node_modules/",
"/dist/",
"/coverage/",
"/test/",
],
};

@ -1,4 +0,0 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "1.0.0-alpha.33"
}

File diff suppressed because it is too large Load Diff

@ -1,39 +0,0 @@
{
"name": "@nextgraph-monorepo/ng-ldo-compact",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"test": "lerna run test",
"build": "lerna run build",
"lint": "lerna run lint",
"clean": "lerna clean --yes && lerna run remove-dist && rimraf node_modules",
"publish": "lerna publish --no-private"
},
"devDependencies": {
"@babel/preset-env": "^7.26.9",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^27.5.2",
"@types/node": "^20.5.7",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@vitejs/plugin-react": "^4.4.1",
"@vitest/coverage-istanbul": "^3.2.3",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.2",
"jest": "^29.7.0",
"jsdom": "^26.1.0",
"lerna": "^7.2.0",
"prettier": "3.0.3",
"ts-jest": "^29.3.0",
"typescript": "^5.2.2",
"vitest": "^3.1.3"
},
"dependencies": {
"prettier-eslint": "^16.4.2"
}
}

@ -1,3 +0,0 @@
{
"extends": ["../../.eslintrc"]
}

@ -1,2 +0,0 @@
example-create
example-init

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Jackson Morgan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,83 +0,0 @@
# @ldo/cli
The `@ldo/cli` is a command line interface for initializing LDO and building ShapeTypes.
## Setup
### Automatic Setup
To setup LDO, `cd` into your typescript project and run `npx @ldo/cli init`.
```bash
cd my-typescript-project
npx @ldo/cli init
```
<details>
<summary>
Manual Setup
</summary>
The following is handled by the __automatic setup__:
Install the LDO dependencies.
```bash
npm install @ldo/ldo
npm install @ldo/cli --save-dev
```
Create a folder to store your ShEx shapes:
```bash
mkdir shapes
```
Create a script to build ShEx shapes and convert them into Linked Data Objects. You can put this script in `package.json`
```json
{
...
scripts: {
...
"build:ldo": "ldo build --input ./shapes --output ./ldo"
...
}
...
}
```
</details>
## Generating a ShapeType
@ldo/cli generates shape types using the `*.shex` files in the "input" folder. If you followed the instructions above, run the following command:
```bash
npm run build:ldo
```
This will generate five files:
- `./ldo/foafProfile.shapeTypes.ts` <-- This is the important file
- `./ldo/foafProfile.typings.ts`
- `./ldo/foafProfile.schema.ts`
- `./ldo/foafProfile.context.ts`
## Creating a new project to distribure shapes
Sometimes, you might want to distribute shapes to others. The easiest way to do that is to deploy them to NPM. The LDO CLI has an easy-to-use command for generating a standalone project just for your shapes.
```bash
npx @ldo/cli create ./my-project
```
This script will generate a project with a place to put your shapes. Running `npm publish` will build the shapes and push to project to NPM for you.
## API Details
- [`init` command](https://ldo.js.org/latest/api/cli/init/)
- [`build` command](https://ldo.js.org/latest/api/cli/build/)
- [`create` command](https://ldo.js.org/latest/api/cli/create/)
## Sponsorship
This project was made possible by a grant from NGI Zero Entrust via nlnet. Learn more on the [NLnet project page](https://nlnet.nl/project/SolidUsableApps/).
[<img src="https://nlnet.nl/logo/banner.png" alt="nlnet foundation logo" width="300" />](https://nlnet.nl/)
[<img src="https://nlnet.nl/image/logos/NGI0Entrust_tag.svg" alt="NGI Zero Entrust Logo" width="300" />](https://nlnet.nl/)
## Liscense
MIT

@ -1,11 +0,0 @@
{
"name": "example-init",
"version": "1.0.0",
"description": "",
"keywords": [
""
],
"author": "",
"license": "MIT",
"main": "./index.js"
}

@ -1,6 +0,0 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const sharedConfig = require("../../jest.config.js");
module.exports = {
...sharedConfig,
rootDir: "./",
};

@ -1,96 +0,0 @@
import fs from "fs-extra";
import path from "path";
import type { Schema } from "@ldo/traverser-shexj";
import parser from "@shexjs/parser";
import schemaConverterShex from "@ldo/schema-converter-shex";
import { renderFile } from "ejs";
import prettier from "prettier";
import loading from "loading-cli";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { forAllShapes } from "./util/forAllShapes.js";
import { annotateReadablePredicates } from "@ldo/schema-converter-shex";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const __dirname = dirname(fileURLToPath(import.meta.url));
interface BuildOptions {
input: string;
output: string;
format?: "ldo" | "compact";
}
export async function build(options: BuildOptions) {
const load = loading("Preparing Environment");
load.start();
// Prepare new folder by clearing/and/or creating it
if (fs.existsSync(options.output)) {
await fs.promises.rm(options.output, { recursive: true });
}
await fs.promises.mkdir(options.output);
const format = options.format || "ldo";
const fileTemplates: string[] = [];
if (format === "compact") {
// Pre-annotate schema with readablePredicate to unify naming across outputs
fileTemplates.push("schema.compact", "typings", "shapeTypes.compact");
} else {
fileTemplates.push("schema", "typings", "shapeTypes", "context");
}
load.text = "Generating LDO Documents";
await forAllShapes(options.input, async (fileName, shexC) => {
// Convert to ShexJ
let schema: Schema;
try {
// @ts-expect-error ...
schema = parser.construct("https://ldo.js.org/").parse(shexC);
} catch (err) {
const errMessage =
err instanceof Error
? err.message
: typeof err === "string"
? err
: "Unknown Error";
console.error(`Error processing ${fileName}: ${errMessage}`);
return;
}
// Add readable predicates to schema as the single source of truth.
if (format === "compact") {
// @ts-expect-error ...
annotateReadablePredicates(schema);
}
const [typings, context, compactSchema] = await schemaConverterShex(
schema,
{
format,
},
);
await Promise.all(
fileTemplates.map(async (templateName) => {
const finalContent = await renderFile(
path.join(__dirname, "./templates", `${templateName}.ejs`),
{
typings: typings.typings,
fileName,
schema: JSON.stringify(schema, null, 2),
context: JSON.stringify(context, null, 2),
compactSchema: JSON.stringify(compactSchema, null, 2),
format,
},
);
await fs.promises.writeFile(
path.join(options.output, `${fileName}.${templateName}.ts`),
await prettier.format(finalContent, { parser: "typescript" }),
);
}),
);
});
load.stop();
}

@ -1,119 +0,0 @@
import { init } from "./init.js";
import {
modifyPackageJson,
savePackageJson,
} from "./util/modifyPackageJson.js";
import { generateReadme } from "./generateReadme.js";
import path from "path";
import prompts from "prompts";
import type { PackageJson } from "type-fest";
import loading from "loading-cli";
import { promises as fs } from "fs";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const __dirname = dirname(fileURLToPath(import.meta.url));
export async function create(directory: string) {
// Init the NPM Package
const responses = await prompts([
{
type: "text",
name: "name",
message: "Package name:",
initial: path.basename(directory),
},
{
type: "text",
name: "version",
message: "Version:",
initial: "1.0.0",
},
{
type: "text",
name: "description",
message: "Description:",
},
{
type: "list",
name: "keywords",
message: "Keywords (comma separated):",
separator: ",",
},
{
type: "text",
name: "author",
message: "Author:",
},
{
type: "text",
name: "license",
message: "License:",
initial: "MIT",
},
{
type: "text",
name: "repository",
message: "Git repository (optional):",
},
]);
const load = loading("Generating package.json");
const packageJson: PackageJson = {
name: responses.name,
version: responses.version,
description: responses.description,
keywords: responses.keywords,
author: responses.author,
license: responses.license,
main: "./index.js",
};
if (responses.repository) {
packageJson.repository = {
type: "git",
url: responses.repository,
};
packageJson.bugs = {
url: `${responses.repository.replace(/\.git$/, "")}/issues`,
};
packageJson.homepage = `${responses.repository.replace(
/\.git$/,
"",
)}#readme`;
}
await savePackageJson(directory, packageJson);
// Init LDO
load.text = "Initializing LDO";
await init(directory);
// Add prepublish script
await modifyPackageJson(directory, async (packageJson) => {
if (!packageJson.scripts) packageJson.scripts = {};
packageJson.scripts.prepublish =
"npm run build:ldo && npm run generate-readme";
packageJson.scripts[
"generate-readme"
] = `ldo generate-readme --project ./ --shapes ./.shapes --ldo ./.ldo`;
return packageJson;
});
// Generate ReadMe
load.text = "Generating README";
await generateReadme({
project: directory,
shapes: path.join(directory, ".shapes"),
ldo: path.join(directory, ".ldo"),
});
// Create .gitignore
load.text = "Create .gitignore";
await fs.writeFile(path.join(directory, ".gitignore"), "node_modules");
load.stop();
}

@ -1,107 +0,0 @@
import { getPackageJson } from "./util/modifyPackageJson.js";
import { forAllShapes } from "./util/forAllShapes.js";
import { promises as fs } from "fs";
import path from "path";
import { Project } from "ts-morph";
import { renderFile } from "ejs";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const __dirname = dirname(fileURLToPath(import.meta.url));
interface GenerateReadmeOptions {
project: string;
shapes: string;
ldo: string;
}
interface ReadmeEjsOptions {
projectName: string;
projectDescription: string;
shapes: {
name: string;
types: {
typeName: string;
shapeTypeName: string;
}[];
shex: string;
typescript: string;
}[];
}
export async function generateReadme(options: GenerateReadmeOptions) {
const packageJson = await getPackageJson(options.project);
const projectName = packageJson.name!;
const projectDescription = packageJson.description!;
const shapes: ReadmeEjsOptions["shapes"] = [];
await forAllShapes(options.shapes, async (fileName, shexC) => {
const typeFilePath = path.join(options.ldo, `${fileName}.typings.ts`);
const typesRaw = await fs.readFile(typeFilePath, "utf8");
const shape: ReadmeEjsOptions["shapes"][0] = {
name: fileName,
shex: shexC,
typescript: typesRaw,
types: [],
};
listInterfaces(typeFilePath).forEach((interfaceName) => {
shape.types.push({
typeName: interfaceName,
shapeTypeName: `${interfaceName}ShapeType`,
});
});
shapes.push(shape);
});
const readmeEjsOptions: ReadmeEjsOptions = {
projectName,
projectDescription,
shapes,
};
// Save Readme
const finalContent = await renderFile(
path.join(__dirname, "./templates/readme/", "main.ejs"),
readmeEjsOptions,
);
// Save readme to document
await fs.writeFile(path.join(options.project, "README.md"), finalContent);
await generateIndex({ project: options.project });
}
/**
* Helper Function that lists all the interfaces in a typescript file
*/
function listInterfaces(filePath: string): string[] {
const project = new Project();
const sourceFile = project.addSourceFileAtPath(filePath);
// Get all interfaces in the file
const interfaces = sourceFile.getInterfaces().map((iface) => iface.getName());
return interfaces;
}
/**
* Generate Index
*/
interface GenerateIndexOptions {
project: string;
}
export async function generateIndex(options: GenerateIndexOptions) {
const ldoDir = await fs.readdir(path.join(options.project, "./.ldo"), {
withFileTypes: true,
});
const indexText = await renderFile(
path.join(__dirname, "./templates/readme/projectIndex.ejs"),
{ fileNames: ldoDir.map((file) => file.name) },
);
await fs.writeFile(path.join(options.project, "index.js"), indexText);
}

@ -1,58 +0,0 @@
#!/usr/bin/env node
import { program } from "commander";
import { build } from "./build.js";
import { init } from "./init.js";
import { create } from "./create.js";
import { generateReadme } from "./generateReadme.js";
program
.name("LDO-CLI")
.description("CLI to some JavaScript string utilities")
.version("3.0.1");
program
.command("build")
.description("Build contents of a shex folder into Shape Types")
.option("-i, --input <inputPath>", "Provide the input path", "./.shapes")
.option("-o, --output <outputPath>", "Provide the output path", "./.ldo")
.option(
"-f, --format <format>",
'Typings format: "compact" (default) or "ldo"',
"compact"
)
.action(build);
program
.command("init")
.argument("[directory]", "A parent directory for ldo files")
.description("Initializes a project for LDO.")
.action(init);
program
.command("create")
.argument("<directory>", "The package's directory")
.description("Creates a standalone package for shapes to publish to NPM.")
.action(create);
program
.command("generate-readme")
.description("Create a ReadMe from the shapes and generated code.")
.requiredOption(
"-p, --project <projectPath>",
"Provide the path to the root project",
"./"
)
.requiredOption(
"-s, --shapes <shapesPath>",
"Provide the path to the shapes folder",
"./.shapes"
)
.requiredOption(
"-s, --ldo <ldoPath>",
"Provide the path to the ldo folder",
"./.ldo"
)
.action(generateReadme);
program.parse();

@ -1,78 +0,0 @@
import { exec } from "child-process-promise";
import fs from "fs-extra";
import path from "path";
import { renderFile } from "ejs";
import { modifyPackageJson } from "./util/modifyPackageJson.js";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const __dirname = dirname(fileURLToPath(import.meta.url));
const DEFAULT_SHAPES_FOLDER = "./.shapes";
const DEFAULT_LDO_FOLDER = "./.ldo";
const POTENTIAL_PARENT_DIRECTORIES = ["src", "lib", "bin"];
export async function init(directory?: string) {
// Find folder to save to
const projectDirectory = directory ?? "./";
// Get the parent directory for the ldo files
let parentDirectory = projectDirectory;
parentDirectory = "./";
const allDirectories = (
await fs.promises.readdir("./", {
withFileTypes: true,
})
).filter((file) => file.isDirectory());
for (let i = 0; i < POTENTIAL_PARENT_DIRECTORIES.length; i++) {
if (
allDirectories.some((dir) => dir.name === POTENTIAL_PARENT_DIRECTORIES[i])
) {
parentDirectory = POTENTIAL_PARENT_DIRECTORIES[i];
break;
}
}
// Install dependencies
await exec(`cd ${projectDirectory} && npm install @ldo/ldo --save`);
await exec(
`cd ${projectDirectory} && npm install @ldo/cli @types/shexj @types/jsonld --save-dev`,
);
// Create "shapes" folder
const shapesFolderPath = path.join(parentDirectory, DEFAULT_SHAPES_FOLDER);
await fs.promises.mkdir(shapesFolderPath);
const defaultShapePaths = await fs.promises.readdir(
path.join(__dirname, "./templates/defaultShapes"),
);
await Promise.all(
defaultShapePaths.map(async (shapePath) => {
const shapeContent = await renderFile(
path.join(__dirname, "./templates/defaultShapes", shapePath),
{},
);
await fs.promises.writeFile(
path.join(shapesFolderPath, `${path.parse(shapePath).name}.shex`),
shapeContent,
);
}),
);
// Add build script
await modifyPackageJson("./", async (packageJson) => {
if (!packageJson.scripts) {
packageJson.scripts = {};
}
const ldoFolder = path.join(parentDirectory, DEFAULT_LDO_FOLDER);
packageJson.scripts["build:ldo"] = `ldo build --input ${path.relative(
projectDirectory,
shapesFolderPath,
)} --output ${path.relative(projectDirectory, ldoFolder)}`;
return packageJson;
});
// Build LDO
await exec(`cd ${projectDirectory} && npm run build:ldo`);
}

@ -1,8 +0,0 @@
import { LdoJsonldContext } from "@ldo/ldo";
/**
* =============================================================================
* <%- fileName %>Context: JSONLD Context for <%- fileName %>
* =============================================================================
*/
export const <%- fileName %>Context: LdoJsonldContext = <%- context %>;

@ -1,19 +0,0 @@
# This shape is provided by default as an example
# You can create your own shape to fit your needs using ShEx (https://shex.io)
# Also check out https://shaperepo.com for examples of more shapes.
PREFIX ex: <https://example.com/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ex:FoafProfile EXTRA a {
a [ foaf:Person ]
// rdfs:comment "Defines the node as a Person (from foaf)" ;
foaf:name xsd:string ?
// rdfs:comment "Define a person's name." ;
foaf:img xsd:string ?
// rdfs:comment "Photo link but in string form" ;
foaf:knows @ex:FoafProfile *
// rdfs:comment "A list of WebIds for all the people this user knows." ;
}

@ -1,15 +0,0 @@
# <%= projectName %>
<%- projectDescription %>
This project includes shapes and generated files for [LDO](https://ldo.js.org).
## Installation
```bash
npm i <%= projectName %>
```
<% shapes.forEach(function(shape) { %>
<%- include('shape', { shape: shape, projectName: projectName }) %>
<% }); %>

@ -1,2 +0,0 @@
<% fileNames.forEach((fileName) => { %>export * from "./.ldo/<%- fileName %>";
<% }); %>

@ -1,27 +0,0 @@
## <%= shape.name %>
### Usage with LDO
```typescript
import { createLdoDataset } from "@ldo/ldo";
import { <%= shape.types.map((type) => type.shapeTypeName).join(", ") %> } from "<%= projectName %>";
import type { <%= shape.types.map((type) => type.typeName).join(", ") %> } from "<%= projectName %>";
const ldoDataset = createLdoDataset();
<% shape.types.forEach(function(type, index) { %>
const example<%= index %>: <%= type.typeName %> = ldoDataset
.usingType(<%= type.shapeTypeName %>)
.fromSubject("http://example.com/example<%= index %>");
<% }); %>
```
### ShEx Typings
```shex
<%- shape.shex %>
```
### TypeScript Typings
```typescript
<%- shape.typescript %>
```

@ -1,8 +0,0 @@
import type { CompactSchema } from "@ldo/ldo";
/**
* =============================================================================
* <%- fileName %>Schema: Compact Schema for <%- fileName %>
* =============================================================================
*/
export const <%- fileName %>Schema: CompactSchema = <%- compactSchema %>;

@ -1,8 +0,0 @@
import type { Schema } from "shexj";
/**
* =============================================================================
* <%- fileName %>Schema: ShexJ Schema for <%- fileName %>
* =============================================================================
*/
export const <%- fileName %>Schema: Schema = <%- schema %>;

@ -1,16 +0,0 @@
import { ShapeType } from "@ldo/ldo";
import { <%- fileName %>Schema } from "./<%- fileName %>.schema";
import { <%- fileName %>Context } from "./<%- fileName %>.context";
import {
<% typings.forEach((typing)=> { if (!/Id$/.test(typing.dts.name)) { -%>
<%- typing.dts.name %>,
<% } }); -%>} from "./<%- fileName %>.typings";
// LDO ShapeTypes for <%- fileName %>
<% typings.forEach((typing)=> { if (!/Id$/.test(typing.dts.name)) { -%>
export const <%- typing.dts.name %>ShapeType: ShapeType<<%- typing.dts.name %>> = {
schema: <%- fileName %>Schema,
shape: "<%- typing.dts.shapeId %>",
context: <%- fileName %>Context,
};
<% } }); -%>

@ -1,18 +0,0 @@
<% if (format==='ldo' ) { -%>
import { LdoJsonldContext, LdSet } from "@ldo/ldo";
<% } else { -%>
export type IRI = string;
<% } -%>
/**
* =============================================================================
* Typescript Typings for <%- fileName %>
* =============================================================================
*/
<% typings.forEach((typing)=> { -%>
/**
* <%- typing.dts.name %> Type
*/
export <%- typing.typingString -%>
<% }); -%>

@ -1,78 +0,0 @@
import fs from "fs";
import path from "path";
import { shaclStoreToShexSchema, writeShexSchema } from "@jeswr/shacl2shex";
import { dereferenceToStore } from "rdf-dereference-store";
import type { Store } from "n3";
import { DataFactory as DF } from "n3";
import { rdf } from "rdf-namespaces";
function hasMatch(store: Store, predicate: string, object: string) {
for (const _ in store.match(
null,
DF.namedNode(predicate),
DF.namedNode(object),
DF.defaultGraph(),
)) {
return true;
}
return false;
}
export async function forAllShapes(
shapePath: string,
callback: (filename: string, shape: string) => Promise<void>,
): Promise<void> {
const shapeDir = await fs.promises.readdir(shapePath, {
withFileTypes: true,
});
// Filter out non-shex documents
const shexFiles = shapeDir.filter(
(file) => file.isFile() && file.name.endsWith(".shex"),
);
const shexPromise = Promise.all(
shexFiles.map(async (file) => {
const fileName = path.parse(file.name).name;
// Get the content of each document
const shexC = await fs.promises.readFile(
path.join(shapePath, file.name),
"utf8",
);
await callback(fileName, shexC);
}),
);
const shaclPromise = Promise.all(
shapeDir.map(async (file) => {
if (file.isFile()) {
let store: Awaited<ReturnType<typeof dereferenceToStore>>;
try {
store = await dereferenceToStore(path.join(shapePath, file.name), {
localFiles: true,
});
} catch (e) {
return;
}
// Make sure the RDF file contains a SHACL shape
if (
hasMatch(
store.store,
rdf.type,
"http://www.w3.org/ns/shacl#NodeShape",
) ||
hasMatch(
store.store,
rdf.type,
"http://www.w3.org/ns/shacl#PropertyShape",
)
) {
const shex = await writeShexSchema(
await shaclStoreToShexSchema(store.store),
store.prefixes,
);
await callback(path.parse(file.name).name, shex);
}
}
}),
);
await Promise.all([shexPromise, shaclPromise]);
}

@ -1,33 +0,0 @@
import type { PackageJson } from "type-fest";
import fs from "fs-extra";
import path from "path";
export async function getPackageJson(
projectFolder: string,
): Promise<PackageJson> {
return JSON.parse(
(
await fs.promises.readFile(path.join(projectFolder, "./package.json"))
).toString(),
);
}
export async function savePackageJson(
projectFolder: string,
packageJson: PackageJson,
): Promise<void> {
await fs.promises.mkdir(projectFolder, { recursive: true });
await fs.promises.writeFile(
path.join(projectFolder, "./package.json"),
JSON.stringify(packageJson, null, 2),
);
}
export async function modifyPackageJson(
projectFolder: string,
modifyCallback: (packageJson: PackageJson) => Promise<PackageJson>,
): Promise<void> {
const packageJson: PackageJson = await getPackageJson(projectFolder);
const newPackageJson = await modifyCallback(packageJson);
await savePackageJson(projectFolder, newPackageJson);
}

@ -1,5 +0,0 @@
describe("cli", () => {
it("trivial", () => {
expect(true).toBe(true);
});
});

@ -1,9 +0,0 @@
{
"extends": "../../tsconfig.esm.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "node",
"outDir": "./dist"
},
"include": ["./src"]
}

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Jackson Morgan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,186 +0,0 @@
# `@ldo/connected-nextgraph`
The `@ldo/connected-nextgraph` library allows you to integrate [NextGraph](https://nextgraph.org) with the [LDO](https://ldo.js.org) ecosystem. It provides a `ConnectedLdoDataset` that manages RDF data across decentralized NextGraph resources with real-time synchronization and read/write capabilities.
## Installation
First, install the required libraries:
```bash
npm install @ldo/connected-nextgraph
```
Also install a version of next-graph you wish to use
```bash
# For applications on NodeJS
npm install nextgraph
# For applications running in the web browser
npm install nextgraphweb
```
## Usage:
### 1. Setup: Create a ConnectedLdoDataset
```ts
import { createNextGraphLdoDataset } from "@ldo/connected-nextgraph";
// Create the dataset
const ldoDataset = createNextGraphLdoDataset();
```
### 2. Connect to a NextGraph Wallet Session
Before you can create or access resources, you need an active session:
```ts
import ng from "nextgraph" // or `import ng from "nextgraphweb"` for the browser
// Open your nextgraph wallet
const openedWallet = await ng.wallet_open_with_mnemonic_words(
walletBinary,
mnemonic,
[1, 2, 3, 4]
);
// Start a session
const session = await ng.session_in_memory_start(
openedWallet.V0.wallet_id,
openedWallet.V0.personal_site
);
```
---
### 3. Link Your Dataset to the NextGraph Session
```ts
ldoDataset.setContext("nextgraph", {
ng,
sessionId: session.session_id
});
```
### 4. Create a Resource
To create a new resource in your store:
```ts
const resource = await ldoDataset.createResource("nextgraph");
if (!resource.isError) {
console.log("Created resource:", resource.uri);
}
```
### 5. Read and Monitor a Resource**
#### Read Existing Resource
```ts
const resource = ldoDataset.getResource(existingUri);
const readResult = await resource.read();
if (!readResult.isError) {
console.log("Resource loaded!", readResult.type);
}
```
#### Read Only If Unfetched
Avoid redundant fetches:
```ts
const readResult = await resource.readIfUnfetched();
```
#### Subscribe to Notifications
```ts
const unsubscribeId = await resource.subscribeToNotifications();
await resource.unsubscribeFromNotification(unsubscribeId);
await resource.unsubscribeFromAllNotifications();
```
---
### 6. Write Data to a Resource
You can write RDF data to a resource using `update()`:
```ts
import { parseRdf } from "@ldo/ldo";
const ttlData = `
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#spiderman> a foaf:Person ; foaf:name "Spiderman" .
`;
const triples = await parseRdf(ttlData);
await resource.update({
added: triples,
removed: undefined
});
```
## Using NextGraph with React
You can also use the `@ldo/react` library with `@ldo/connected-nextgraph`.
### 1. Create the react methods
First, we initialize some methods to use with the `@ldo/connected-nextgraph` and
`@ldo/react` libraries.
```typescript
// ./reactMethods.ts
import { nextGraphConnectedPlugin } from "@ldo/connected-nextgraph";
import { createLdoReactMethods } from "@ldo/react";
import ng from "nextgraphweb";
export const {
dataset,
useLdo,
useMatchObject,
useMatchSubject,
useResource,
useSubject,
useSubscribeToResource,
} = createLdoReactMethods([nextGraphConnectedPlugin]);
// Set NG on the data. When the sessionId is retrieved, `setContext` can be
// called at any time to set that as well.
dataset.setContext("nextgraph", {
ng,
sessionId: "SOME_ID"
});
```
### 2. Use the methods in your React components
From there, you can import these created methods in your React component and use
them as you would use any of the methods in the [@ldo/react-solid](https://ldo.js.org/latest/guides/solid_react/)
library.
```typescript
import { FunctionComponent } from "react";
import { PostShShapeType } from "./.ldo/post.shapeTypes.js";
import { useResource, useSubject } from "./reactMethods.js";
export const UseSubjectTest: FunctionComponent = () => {
useResource("did:ng:SOME_URI");
const post = useSubject(PostShShapeType, `SomeOtherUri`);
return <p role="article">{post.articleBody}</p>;
};
```
## Sponsorship
This project was made possible by a grant from NGI Zero Entrust via nlnet. Learn more on the [NLnet project page](https://nlnet.nl/project/SolidUsableApps/).
[<img src="https://nlnet.nl/logo/banner.png" alt="nlnet foundation logo" width="300" />](https://nlnet.nl/)
[<img src="https://nlnet.nl/image/logos/NGI0Entrust_tag.svg" alt="NGI Zero Entrust Logo" width="300" />](https://nlnet.nl/)
## Liscense
MIT

@ -1,73 +0,0 @@
{
"name": "@ldo/connected-nextgraph",
"version": "1.0.0-alpha.32",
"description": "A plugin for @ldo/connected to work with the Solid ecosystem.",
"type": "module",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.cjs"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "rimraf dist && npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.cjs.json && node ../../scripts/rename-to-cjs.js",
"build:esm": "tsc --project tsconfig.esm.json",
"test": "[ \"$CI\" = \"true\" ] && echo 'Skipping integration tests in CI.' || npm run test:integration",
"prepublishOnly": " npm run build",
"lint": "eslint src/** --fix --no-error-on-unmatched-pattern",
"docs": "typedoc --plugin typedoc-plugin-markdown",
"start-test-server": "./test/ngd -vv --save-key -l 14400 --base ./test/nextgraph-data",
"start-integration-test": "vitest run --coverage",
"test:integration": "start-server-and-test start-test-server http-get://localhost:14400 start-integration-test",
"remove-dist": "rimraf dist/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/o-development/ldo.git"
},
"author": "Jackson Morgan",
"license": "MIT",
"bugs": {
"url": "https://github.com/o-development/ldo/issues"
},
"homepage": "https://github.com/o-development/ldo/tree/main/packages/solid#readme",
"devDependencies": {
"@inrupt/solid-client-authn-core": "^3.0.0",
"@ldo/cli": "^1.0.0-alpha.32",
"@rdfjs/types": "^1.0.1",
"@solid-notifications/types": "^0.1.2",
"@solid/community-server": "8.0.0-alpha.0",
"cross-env": "^7.0.3",
"dotenv": "^16.3.1",
"jest-rdf": "^1.8.0",
"nextgraph": "^0.1.1-alpha.7",
"start-server-and-test": "^2.0.11",
"ts-node": "^10.9.1",
"typed-emitter": "^2.1.0",
"typedoc": "^0.25.4",
"typedoc-plugin-markdown": "^3.17.1"
},
"dependencies": {
"@ldo/connected": "^1.0.0-alpha.32",
"@ldo/dataset": "^1.0.0-alpha.30",
"@ldo/ldo": "^1.0.0-alpha.32",
"@ldo/rdf-utils": "^1.0.0-alpha.30",
"@solid-notifications/subscription": "^0.1.2",
"cross-fetch": "^3.1.6",
"ws": "^8.18.0"
},
"files": [
"dist",
"src"
],
"publishConfig": {
"access": "public"
},
"gitHead": "840910c56ec3f61416f031cc76771a5673af6757"
}

@ -1,87 +0,0 @@
import type { ConnectedContext, ConnectedPlugin } from "@ldo/connected";
import type { NextGraphUri } from "./types.js";
import { NextGraphResource } from "./resources/NextGraphResource.js";
import { isNextGraphUri } from "./util/isNextGraphUri.js";
export interface NextGraphConnectedContext {
// NG does not have a type definition
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ng?: any;
sessionId?: string;
protectedStoreId?: string;
privateStoreId?: string;
publicStoreId?: string;
}
export interface NextGraphCreateResourceOptions {
storeType?: "public" | "protected" | "private" | "group" | "dialog";
storeRepo?: string;
primaryClass?: string;
}
export interface NextGraphConnectedPlugin
extends ConnectedPlugin<
"nextgraph",
NextGraphUri,
NextGraphResource,
NextGraphConnectedContext,
NextGraphCreateResourceOptions
> {
name: "nextgraph";
getResource: (
uri: NextGraphUri,
context: ConnectedContext<this[]>,
) => NextGraphResource;
createResource(context: ConnectedContext<this[]>): Promise<NextGraphResource>;
}
export const nextGraphConnectedPlugin: NextGraphConnectedPlugin = {
name: "nextgraph",
getResource: function (
uri: NextGraphUri,
context: ConnectedContext<NextGraphConnectedPlugin[]>,
): NextGraphResource {
return new NextGraphResource(uri, context);
},
createResource: async function (
context: ConnectedContext<NextGraphConnectedPlugin[]>,
options?: NextGraphCreateResourceOptions,
): Promise<NextGraphResource> {
const storeType = options?.storeType;
const storeRepo =
options?.storeRepo ??
(storeType === "protected"
? context.nextgraph.protectedStoreId
: storeType === "public"
? context.nextgraph.publicStoreId
: storeType === "private"
? context.nextgraph.privateStoreId
: undefined);
const primaryClass = options?.primaryClass ?? "data:graph";
const nuri: NextGraphUri = await context.nextgraph.ng.doc_create(
context.nextgraph.sessionId,
"Graph",
primaryClass,
"store",
storeType,
storeRepo,
);
const newResource = new NextGraphResource(nuri, context);
await newResource.read();
return newResource;
},
isUriValid: function (uri: string): uri is NextGraphUri {
return isNextGraphUri(uri);
},
initialContext: {
sessionId: undefined,
},
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore "Types" only exists for the typing system
types: {},
};

@ -1,13 +0,0 @@
import { ConnectedLdoDataset } from "@ldo/connected";
import { nextGraphConnectedPlugin } from "./NextGraphConnectedPlugin.js";
import { createDatasetFactory } from "@ldo/dataset";
import { createTransactionDatasetFactory } from "@ldo/subscribable-dataset";
export function createNextGraphLdoDataset() {
const nextGraphLdoDataset = new ConnectedLdoDataset(
[nextGraphConnectedPlugin],
createDatasetFactory(),
createTransactionDatasetFactory(),
);
return nextGraphLdoDataset;
}

@ -1,10 +0,0 @@
export * from "./types.js";
export * from "./NextGraphConnectedPlugin.js";
export * from "./resources/NextGraphResource.js";
export * from "./util/isNextGraphUri.js";
export * from "./results/NextGraphReadSuccess.js";
export * from "./createNextGraphLdoDataset.js";

@ -1,15 +0,0 @@
export interface NextGraphNotificationMessage {
V0: {
State?: {
graph: {
triples: AllowSharedBufferSource;
};
};
Patch?: {
graph: {
inserts: AllowSharedBufferSource;
removes: AllowSharedBufferSource;
};
};
};
}

@ -1,23 +0,0 @@
import { NotificationSubscription } from "@ldo/connected";
import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin.js";
import type { NextGraphNotificationMessage } from "./NextGraphNotificationMessage.js";
export class NextGraphNotificationSubscription extends NotificationSubscription<
NextGraphConnectedPlugin,
NextGraphNotificationMessage
> {
private unsub: (() => void) | undefined;
protected async open(): Promise<void> {
this.unsub = await this.context.nextgraph.ng.doc_subscribe(
this.resource.uri,
this.context.nextgraph.sessionId,
this.onNotification.bind(this),
);
}
protected async close(): Promise<void> {
this.unsub?.();
this.unsub = undefined;
}
}

@ -1,270 +0,0 @@
import type {
ConnectedContext,
NotificationSubscription,
SubscriptionCallbacks,
} from "@ldo/connected";
import { UnexpectedResourceError, UpdateSuccess } from "@ldo/connected";
import {
Unfetched,
type ConnectedResult,
type Resource,
type ResourceEventEmitter,
} from "@ldo/connected";
import type { NextGraphUri } from "../types.js";
import EventEmitter from "events";
import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin.js";
import { changesToSparqlUpdate, type DatasetChanges } from "@ldo/rdf-utils";
import type { NextGraphNotificationMessage } from "../notifications/NextGraphNotificationMessage.js";
import type { Dataset, Quad } from "@rdfjs/types";
import { namedNode, quad as createQuad } from "@ldo/rdf-utils";
import { NextGraphReadSuccess } from "../results/NextGraphReadSuccess.js";
import { NextGraphNotificationSubscription } from "../notifications/NextGraphNotificationSubscription.js";
import { parseRdf } from "@ldo/ldo";
import type { LdoDataset } from "@ldo/ldo";
import { createDataset } from "@ldo/dataset";
export class NextGraphResource
extends (EventEmitter as new () => ResourceEventEmitter)
implements Resource<NextGraphUri>
{
public readonly uri: NextGraphUri;
public readonly type = "NextGraphResource" as const;
public readonly isError = false as const;
public status: ConnectedResult;
protected context: ConnectedContext<NextGraphConnectedPlugin[]>;
private fetched: boolean = false;
private loading: boolean = false;
private present: boolean | undefined = undefined;
/**
* @internal
* Handles notification subscriptions
*/
protected notificationSubscription: NotificationSubscription<
NextGraphConnectedPlugin,
NextGraphNotificationMessage
>;
constructor(
uri: NextGraphUri,
context: ConnectedContext<NextGraphConnectedPlugin[]>,
) {
super();
this.uri = uri;
this.status = new Unfetched(this);
this.context = context;
this.notificationSubscription = new NextGraphNotificationSubscription(
this,
this.onNotification.bind(this),
this.context,
);
}
isLoading(): boolean {
return this.loading;
}
isFetched(): boolean {
return this.fetched;
}
isUnfetched(): boolean {
return !this.fetched;
}
isDoingInitialFetch(): boolean {
return this.loading && !this.fetched;
}
isPresent(): boolean | undefined {
return this.present;
}
isAbsent(): boolean | undefined {
return !this.present;
}
isSubscribedToNotifications(): boolean {
return this.notificationSubscription.isSubscribedToNotifications();
}
private handleThrownError(
err: unknown,
): UnexpectedResourceError<NextGraphResource> {
const error = UnexpectedResourceError.fromThrown(this, err);
this.loading = false;
this.status = error;
this.emit("update");
return error;
}
private overwriteQuads(quads: Quad[] | Dataset<Quad>) {
const dataset = this.context.dataset;
const graphNode = namedNode(this.uri);
dataset.deleteMatches(undefined, undefined, undefined, graphNode);
dataset.addAll(
quads.map((ngQuad) => {
return createQuad(
ngQuad.subject,
ngQuad.predicate,
ngQuad.object,
graphNode,
);
}),
);
}
async read(): Promise<
NextGraphReadSuccess | UnexpectedResourceError<NextGraphResource>
> {
try {
this.loading = true;
this.emit("update");
// Fetch the data once using construct
const sparqlResult = await this.context.nextgraph.ng.sparql_query(
this.context.nextgraph.sessionId,
`CONSTRUCT { ?s ?p ?o } WHERE { GRAPH <${this.uri}> { ?s ?p ?o } }`,
undefined,
this.uri,
);
// Update the dataset
this.overwriteQuads(sparqlResult);
// Update statuses
const result = new NextGraphReadSuccess(this, false);
this.loading = false;
this.fetched = true;
this.present = true;
this.status = result;
this.emit("update");
return result;
} catch (err) {
if (err === "RepoNotFound") {
const result = new NextGraphReadSuccess(this, false);
this.loading = false;
this.fetched = true;
this.present = false;
this.status = result;
this.emit("update");
return result;
}
return this.handleThrownError(err);
}
}
async readIfUnfetched(): Promise<
NextGraphReadSuccess | UnexpectedResourceError<NextGraphResource>
> {
if (this.isFetched()) {
return new NextGraphReadSuccess(this, true);
}
return this.read();
}
async update(
datasetChanges: DatasetChanges<Quad>,
): Promise<
| UpdateSuccess<NextGraphResource>
| UnexpectedResourceError<NextGraphResource>
> {
this.loading = true;
this.emit("update");
// Optimistically apply updates
this.context.dataset.bulk(datasetChanges);
try {
// Perform Update with remote
await this.context.nextgraph.ng.sparql_update(
this.context.nextgraph.sessionId,
await changesToSparqlUpdate(datasetChanges),
this.uri,
);
return new UpdateSuccess(this);
} catch (err) {
// Revert data on error
this.context.dataset.bulk({
added: datasetChanges.removed,
removed: datasetChanges.added,
});
return this.handleThrownError(err);
}
}
private async notificationToQuads(
notificationString: string,
): Promise<Dataset<Quad>> {
const rawTriples = JSON.parse(notificationString);
const triples = (
await Promise.all<LdoDataset>(
rawTriples.map(async (rawTriple) =>
parseRdf(`${rawTriple}.`, { baseIRI: this.uri }),
),
)
).reduce((agg, ldoDataset) => {
ldoDataset.forEach((quad) => {
agg.add(
createQuad(
quad.subject,
quad.predicate,
quad.object,
namedNode(this.uri),
),
);
});
return agg;
}, createDataset());
return triples;
}
protected async onNotification(response: NextGraphNotificationMessage) {
if (response.V0.State) {
if (!response.V0.State.graph) {
this.overwriteQuads([]);
return;
}
const json_str = new TextDecoder().decode(
response.V0.State.graph.triples,
);
const triples = await this.notificationToQuads(json_str);
this.overwriteQuads(triples);
} else if (response.V0.Patch?.graph) {
const insertsString = new TextDecoder().decode(
response.V0.Patch.graph.inserts,
);
const removesString = new TextDecoder().decode(
response.V0.Patch.graph.removes,
);
const [added, removed] = await Promise.all(
[insertsString, removesString].map(async (str) => {
return this.notificationToQuads(str);
}),
);
this.context.dataset.bulk({
added,
removed,
});
}
}
async subscribeToNotifications(
callbacks?: SubscriptionCallbacks<NextGraphNotificationMessage>,
): Promise<string> {
return await this.notificationSubscription.subscribeToNotifications(
callbacks,
);
}
unsubscribeFromNotifications(subscriptionId: string): Promise<void> {
return this.notificationSubscription.unsubscribeFromNotification(
subscriptionId,
);
}
unsubscribeFromAllNotifications(): Promise<void> {
return this.notificationSubscription.unsubscribeFromAllNotifications();
}
}

@ -1,6 +0,0 @@
import { ReadSuccess } from "@ldo/connected";
import type { NextGraphResource } from "../resources/NextGraphResource.js";
export class NextGraphReadSuccess extends ReadSuccess<NextGraphResource> {
type = "nextGraphReadSuccess" as const;
}

@ -1,8 +0,0 @@
export type NextGraphUriPrefix = `did:ng`;
/**
* A NextGraph is a URI that is valid in the NextGraph ecosystem
*/
// The & {} allows for alias preservation
// eslint-disable-next-line @typescript-eslint/ban-types
export type NextGraphUri = `${NextGraphUriPrefix}${string}` & {};

@ -1,15 +0,0 @@
export interface NextGraphNotificationMessage {
V0: {
State: {
graph: {
triples: AllowSharedBufferSource;
};
};
Patch: {
graph: {
inserts: AllowSharedBufferSource;
removes: AllowSharedBufferSource;
};
};
};
}

@ -1,10 +0,0 @@
import type { NextGraphUri } from "../types.js";
/**
* Checks if a provided string is a leaf URI
* @param uri - the string to check
* @returns true if the string is a leaf URI
*/
export function isNextGraphUri(uri: string): uri is NextGraphUri {
return uri.startsWith("did:ng");
}

@ -1,162 +0,0 @@
import type { ConnectedLdoDataset } from "@ldo/connected";
import ng from "nextgraph";
import type {
NextGraphConnectedPlugin,
NextGraphResource,
NextGraphUri,
} from "../src/index.js";
import { createNextGraphLdoDataset } from "../src/createNextGraphLdoDataset.js";
import { parseRdf } from "@ldo/ldo";
import { namedNode } from "@ldo/rdf-utils";
import type { NextGraphReadSuccess } from "../src/results/NextGraphReadSuccess.js";
import { rm, cp } from "fs/promises";
import path from "path";
import { describe, it, expect, beforeEach, afterAll } from "vitest";
const SAMPLE_TTL = `@base <http://example.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rel: <http://www.perceive.net/schemas/relationship/> .
<#green-goblin>
rel:enemyOf <#spiderman> ;
a foaf:Person ; # in the context of the Marvel universe
foaf:name "Green Goblin" .
<#spiderman>
rel:enemyOf <#green-goblin> ;
a foaf:Person ;
foaf:name "Spiderman", "Человек-паук"@ru .`;
describe("NextGraph Plugin", () => {
let nextgraphLdoDataset: ConnectedLdoDataset<NextGraphConnectedPlugin[]>;
beforeEach(async () => {
// Generate a wallet
const [wallet, mnemonic] = await ng.gen_wallet_for_test(
"lL2mo9Jtgz8yWN5PSaEMMftDGXyKJNbv9atQOygmeTcA",
);
const openedWallet = await ng.wallet_open_with_mnemonic_words(
wallet.wallet,
mnemonic,
[1, 2, 1, 2],
);
const userId = openedWallet.V0.personal_site;
const walletName = openedWallet.V0.wallet_id;
const session = await ng.session_in_memory_start(walletName, userId);
const sessionId = session.session_id;
const protectedStoreId = session.protected_store_id.substring(2, 46);
const publicStoreId = session.protected_store_id.substring(2, 46);
const privateStoreId = session.protected_store_id.substring(2, 46);
// Get SessionId for that wallet
nextgraphLdoDataset = createNextGraphLdoDataset();
nextgraphLdoDataset.setContext("nextgraph", {
ng,
sessionId,
protectedStoreId,
publicStoreId,
privateStoreId,
});
});
afterAll(async () => {
const dataDir = path.resolve(__dirname, "./nextgraph-data");
const backupDir = path.resolve(__dirname, "./nextgraph-data-backup");
// Remove the existing data directory
await rm(dataDir, { recursive: true, force: true });
// Copy the entire backup directory to data directory
await cp(backupDir, dataDir, { recursive: true });
});
describe("createResource", () => {
it("creates a resource by assuming the protected store", async () => {
const resource = await nextgraphLdoDataset.createResource("nextgraph");
expect(resource.isError).toBe(false);
const resourceAsR = resource as NextGraphResource;
expect(resourceAsR.uri).toBeDefined();
expect(resourceAsR.isFetched()).toBe(true);
expect(resourceAsR.isPresent()).toBe(true);
});
});
describe("read and subscribe", () => {
let populatedResourceUri: NextGraphUri;
beforeEach(async () => {
const resource = (await nextgraphLdoDataset.createResource(
"nextgraph",
)) as NextGraphResource;
await resource.update({
added: await parseRdf(SAMPLE_TTL),
});
nextgraphLdoDataset.forgetAllResources();
nextgraphLdoDataset.deleteMatches(
undefined,
undefined,
undefined,
undefined,
);
populatedResourceUri = resource.uri;
});
it("reads a resource that exists", async () => {
expect(nextgraphLdoDataset.size).toBe(0);
const resource = nextgraphLdoDataset.getResource(populatedResourceUri);
const result = await resource.read();
expect(result.isError).toBe(false);
expect(result.type).toBe("nextGraphReadSuccess");
expect(resource.isAbsent()).toBe(false);
expect(resource.isPresent()).toBe(true);
expect(resource.isLoading()).toBe(false);
expect(nextgraphLdoDataset.size).toBe(7);
expect(
nextgraphLdoDataset.match(
namedNode("http://example.org/#spiderman"),
namedNode("http://www.perceive.net/schemas/relationship/enemyOf"),
namedNode("http://example.org/#green-goblin"),
namedNode(resource.uri),
).size,
).toBe(1);
});
it("reads a resource that is absent", async () => {
const nuri =
"did:ng:o:W6GCQRfQkNTLtSS_2-QhKPJPkhEtLVh-B5lzpWMjGNEA:v:h8ViqyhCYMS2I6IKwPrY6UZi4ougUm1gpM4QnxlmNMQA";
const resource = nextgraphLdoDataset.getResource(nuri);
const readResult = await resource.read();
expect(resource.uri).toBe(nuri);
expect(readResult.type).toBe("nextGraphReadSuccess");
expect(nextgraphLdoDataset.size).toBe(0);
expect(resource.isLoading()).toBe(false);
expect(resource.isAbsent()).toBe(true);
});
it("Reads a resource from memory.", async () => {
const resource = nextgraphLdoDataset.getResource(populatedResourceUri);
await resource.read();
const result2 = await resource.readIfUnfetched();
expect(result2.isError).toBe(false);
const result = result2 as NextGraphReadSuccess;
expect(result.type).toBe("nextGraphReadSuccess");
expect(result.recalledFromMemory).toBe(true);
});
it("Subscribes to a resource", async () => {
const resource = nextgraphLdoDataset.getResource(populatedResourceUri);
await resource.subscribeToNotifications();
// Wait for subscription
await new Promise((resolve) => setTimeout(resolve, 200));
expect(nextgraphLdoDataset.size).toBe(7);
expect(
nextgraphLdoDataset.match(
namedNode("http://example.org/#spiderman"),
namedNode("http://www.perceive.net/schemas/relationship/enemyOf"),
namedNode("http://example.org/#green-goblin"),
namedNode(resource.uri),
).size,
).toBe(1);
await resource.unsubscribeFromAllNotifications();
});
});
});

@ -1,343 +0,0 @@
2025/03/30-11:04:47.344345 8029035584 RocksDB version: 8.6.0
2025/03/30-11:04:47.344366 8029035584 Compile date 2023-06-15 05:32:14
2025/03/30-11:04:47.344367 8029035584 DB SUMMARY
2025/03/30-11:04:47.344367 8029035584 DB Session ID: 5WJ1J1MXYEBJX1PPHEZ3
2025/03/30-11:04:47.344401 8029035584 CURRENT file: CURRENT
2025/03/30-11:04:47.344402 8029035584 IDENTITY file: IDENTITY
2025/03/30-11:04:47.344404 8029035584 MANIFEST file: MANIFEST-000019 size: 391 Bytes
2025/03/30-11:04:47.344405 8029035584 SST files in /Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts dir, Total Num: 2, files: 000010.sst 000017.sst
2025/03/30-11:04:47.344406 8029035584 Write Ahead Log file in /Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts: 000004.log size: 113 ; 000011.log size: 114 ; 000018.log size: 0 ;
2025/03/30-11:04:47.344407 8029035584 Options.error_if_exists: 0
2025/03/30-11:04:47.344407 8029035584 Options.create_if_missing: 1
2025/03/30-11:04:47.344407 8029035584 Options.paranoid_checks: 1
2025/03/30-11:04:47.344408 8029035584 Options.flush_verify_memtable_count: 1
2025/03/30-11:04:47.344408 8029035584 Options.compaction_verify_record_count: 1
2025/03/30-11:04:47.344409 8029035584 Options.track_and_verify_wals_in_manifest: 0
2025/03/30-11:04:47.344409 8029035584 Options.verify_sst_unique_id_in_manifest: 1
2025/03/30-11:04:47.344409 8029035584 Options.env: 0x600000b74300
2025/03/30-11:04:47.344410 8029035584 Options.fs: EncryptedFileSystem
2025/03/30-11:04:47.344410 8029035584 Options.info_log: 0x11f707ea8
2025/03/30-11:04:47.344411 8029035584 Options.max_file_opening_threads: 16
2025/03/30-11:04:47.344411 8029035584 Options.statistics: 0x0
2025/03/30-11:04:47.344412 8029035584 Options.use_fsync: 0
2025/03/30-11:04:47.344412 8029035584 Options.max_log_file_size: 0
2025/03/30-11:04:47.344412 8029035584 Options.max_manifest_file_size: 1073741824
2025/03/30-11:04:47.344413 8029035584 Options.log_file_time_to_roll: 0
2025/03/30-11:04:47.344413 8029035584 Options.keep_log_file_num: 1000
2025/03/30-11:04:47.344414 8029035584 Options.recycle_log_file_num: 0
2025/03/30-11:04:47.344414 8029035584 Options.allow_fallocate: 1
2025/03/30-11:04:47.344414 8029035584 Options.allow_mmap_reads: 0
2025/03/30-11:04:47.344415 8029035584 Options.allow_mmap_writes: 0
2025/03/30-11:04:47.344415 8029035584 Options.use_direct_reads: 0
2025/03/30-11:04:47.344416 8029035584 Options.use_direct_io_for_flush_and_compaction: 0
2025/03/30-11:04:47.344416 8029035584 Options.create_missing_column_families: 1
2025/03/30-11:04:47.344416 8029035584 Options.db_log_dir:
2025/03/30-11:04:47.344417 8029035584 Options.wal_dir:
2025/03/30-11:04:47.344417 8029035584 Options.table_cache_numshardbits: 6
2025/03/30-11:04:47.344418 8029035584 Options.WAL_ttl_seconds: 0
2025/03/30-11:04:47.344418 8029035584 Options.WAL_size_limit_MB: 0
2025/03/30-11:04:47.344418 8029035584 Options.max_write_batch_group_size_bytes: 1048576
2025/03/30-11:04:47.344419 8029035584 Options.manifest_preallocation_size: 4194304
2025/03/30-11:04:47.344419 8029035584 Options.is_fd_close_on_exec: 1
2025/03/30-11:04:47.344420 8029035584 Options.advise_random_on_open: 1
2025/03/30-11:04:47.344420 8029035584 Options.db_write_buffer_size: 67108864
2025/03/30-11:04:47.344420 8029035584 Options.write_buffer_manager: 0x600001474340
2025/03/30-11:04:47.344421 8029035584 Options.access_hint_on_compaction_start: 1
2025/03/30-11:04:47.344421 8029035584 Options.random_access_max_buffer_size: 1048576
2025/03/30-11:04:47.344422 8029035584 Options.use_adaptive_mutex: 0
2025/03/30-11:04:47.344422 8029035584 Options.rate_limiter: 0x0
2025/03/30-11:04:47.344423 8029035584 Options.sst_file_manager.rate_bytes_per_sec: 0
2025/03/30-11:04:47.344423 8029035584 Options.wal_recovery_mode: 2
2025/03/30-11:04:47.344423 8029035584 Options.enable_thread_tracking: 0
2025/03/30-11:04:47.344424 8029035584 Options.enable_pipelined_write: 0
2025/03/30-11:04:47.344424 8029035584 Options.unordered_write: 0
2025/03/30-11:04:47.344425 8029035584 Options.allow_concurrent_memtable_write: 1
2025/03/30-11:04:47.344425 8029035584 Options.enable_write_thread_adaptive_yield: 1
2025/03/30-11:04:47.344425 8029035584 Options.write_thread_max_yield_usec: 100
2025/03/30-11:04:47.344426 8029035584 Options.write_thread_slow_yield_usec: 3
2025/03/30-11:04:47.344426 8029035584 Options.row_cache: None
2025/03/30-11:04:47.344427 8029035584 Options.wal_filter: None
2025/03/30-11:04:47.344427 8029035584 Options.avoid_flush_during_recovery: 0
2025/03/30-11:04:47.344427 8029035584 Options.allow_ingest_behind: 0
2025/03/30-11:04:47.344428 8029035584 Options.two_write_queues: 0
2025/03/30-11:04:47.344428 8029035584 Options.manual_wal_flush: 0
2025/03/30-11:04:47.344429 8029035584 Options.wal_compression: 0
2025/03/30-11:04:47.344429 8029035584 Options.atomic_flush: 0
2025/03/30-11:04:47.344429 8029035584 Options.avoid_unnecessary_blocking_io: 0
2025/03/30-11:04:47.344430 8029035584 Options.persist_stats_to_disk: 0
2025/03/30-11:04:47.344430 8029035584 Options.write_dbid_to_manifest: 0
2025/03/30-11:04:47.344431 8029035584 Options.log_readahead_size: 0
2025/03/30-11:04:47.344431 8029035584 Options.file_checksum_gen_factory: Unknown
2025/03/30-11:04:47.344431 8029035584 Options.best_efforts_recovery: 0
2025/03/30-11:04:47.344432 8029035584 Options.max_bgerror_resume_count: 2147483647
2025/03/30-11:04:47.344432 8029035584 Options.bgerror_resume_retry_interval: 1000000
2025/03/30-11:04:47.344433 8029035584 Options.allow_data_in_errors: 0
2025/03/30-11:04:47.344433 8029035584 Options.db_host_id: __hostname__
2025/03/30-11:04:47.344434 8029035584 Options.enforce_single_del_contracts: true
2025/03/30-11:04:47.344434 8029035584 Options.max_background_jobs: 12
2025/03/30-11:04:47.344434 8029035584 Options.max_background_compactions: -1
2025/03/30-11:04:47.344435 8029035584 Options.max_subcompactions: 1
2025/03/30-11:04:47.344435 8029035584 Options.avoid_flush_during_shutdown: 0
2025/03/30-11:04:47.344436 8029035584 Options.writable_file_max_buffer_size: 1048576
2025/03/30-11:04:47.344436 8029035584 Options.delayed_write_rate : 16777216
2025/03/30-11:04:47.344436 8029035584 Options.max_total_wal_size: 1073741824
2025/03/30-11:04:47.344437 8029035584 Options.delete_obsolete_files_period_micros: 21600000000
2025/03/30-11:04:47.344437 8029035584 Options.stats_dump_period_sec: 600
2025/03/30-11:04:47.344438 8029035584 Options.stats_persist_period_sec: 600
2025/03/30-11:04:47.344438 8029035584 Options.stats_history_buffer_size: 1048576
2025/03/30-11:04:47.344439 8029035584 Options.max_open_files: -1
2025/03/30-11:04:47.344439 8029035584 Options.bytes_per_sync: 0
2025/03/30-11:04:47.344439 8029035584 Options.wal_bytes_per_sync: 0
2025/03/30-11:04:47.344440 8029035584 Options.strict_bytes_per_sync: 0
2025/03/30-11:04:47.344440 8029035584 Options.compaction_readahead_size: 2097152
2025/03/30-11:04:47.344441 8029035584 Options.max_background_flushes: -1
2025/03/30-11:04:47.344441 8029035584 Compression algorithms supported:
2025/03/30-11:04:47.344441 8029035584 kZSTD supported: 0
2025/03/30-11:04:47.344442 8029035584 kZlibCompression supported: 0
2025/03/30-11:04:47.344442 8029035584 kXpressCompression supported: 0
2025/03/30-11:04:47.344443 8029035584 kSnappyCompression supported: 0
2025/03/30-11:04:47.344443 8029035584 kZSTDNotFinalCompression supported: 0
2025/03/30-11:04:47.344444 8029035584 kLZ4HCCompression supported: 0
2025/03/30-11:04:47.344444 8029035584 kLZ4Compression supported: 0
2025/03/30-11:04:47.344445 8029035584 kBZip2Compression supported: 0
2025/03/30-11:04:47.344447 8029035584 Fast CRC32 supported: Supported on Arm64
2025/03/30-11:04:47.344448 8029035584 DMutex implementation: pthread_mutex_t
2025/03/30-11:04:47.344517 8029035584 [db/version_set.cc:5858] Recovering from manifest file: /Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts/MANIFEST-000019
2025/03/30-11:04:47.344548 8029035584 [db/column_family.cc:617] --------------- Options for column family [default]:
2025/03/30-11:04:47.344549 8029035584 Options.comparator: leveldb.BytewiseComparator
2025/03/30-11:04:47.344550 8029035584 Options.merge_operator: None
2025/03/30-11:04:47.344550 8029035584 Options.compaction_filter: None
2025/03/30-11:04:47.344551 8029035584 Options.compaction_filter_factory: None
2025/03/30-11:04:47.344551 8029035584 Options.sst_partitioner_factory: None
2025/03/30-11:04:47.344552 8029035584 Options.memtable_factory: SkipListFactory
2025/03/30-11:04:47.344552 8029035584 Options.table_factory: BlockBasedTable
2025/03/30-11:04:47.344558 8029035584 table_factory options: flush_block_policy_factory: FlushBlockBySizePolicyFactory (0x600002f4c100)
cache_index_and_filter_blocks: 1
cache_index_and_filter_blocks_with_high_priority: 1
pin_l0_filter_and_index_blocks_in_cache: 1
pin_top_level_index_and_filter: 1
index_type: 0
data_block_index_type: 0
index_shortening: 1
data_block_hash_table_util_ratio: 0.750000
checksum: 4
no_block_cache: 0
block_cache: 0x600001a70798
block_cache_name: LRUCache
block_cache_options:
capacity : 67108864
num_shard_bits : 6
strict_capacity_limit : 0
memory_allocator : None
high_pri_pool_ratio: 0.500
low_pri_pool_ratio: 0.000
persistent_cache: 0x0
block_size: 16384
block_size_deviation: 10
block_restart_interval: 16
index_block_restart_interval: 1
metadata_block_size: 4096
partition_filters: 0
use_delta_encoding: 1
filter_policy: bloomfilter
whole_key_filtering: 1
verify_compression: 0
read_amp_bytes_per_bit: 0
format_version: 6
enable_index_compression: 1
block_align: 0
max_auto_readahead_size: 262144
prepopulate_block_cache: 0
initial_auto_readahead_size: 8192
num_file_reads_for_auto_readahead: 2
2025/03/30-11:04:47.344559 8029035584 Options.write_buffer_size: 67108864
2025/03/30-11:04:47.344559 8029035584 Options.max_write_buffer_number: 2
2025/03/30-11:04:47.344560 8029035584 Options.compression: NoCompression
2025/03/30-11:04:47.344560 8029035584 Options.bottommost_compression: Disabled
2025/03/30-11:04:47.344561 8029035584 Options.prefix_extractor: nullptr
2025/03/30-11:04:47.344561 8029035584 Options.memtable_insert_with_hint_prefix_extractor: nullptr
2025/03/30-11:04:47.344562 8029035584 Options.num_levels: 7
2025/03/30-11:04:47.344562 8029035584 Options.min_write_buffer_number_to_merge: 1
2025/03/30-11:04:47.344563 8029035584 Options.max_write_buffer_number_to_maintain: 0
2025/03/30-11:04:47.344563 8029035584 Options.max_write_buffer_size_to_maintain: 134217728
2025/03/30-11:04:47.344563 8029035584 Options.bottommost_compression_opts.window_bits: -14
2025/03/30-11:04:47.344564 8029035584 Options.bottommost_compression_opts.level: 32767
2025/03/30-11:04:47.344564 8029035584 Options.bottommost_compression_opts.strategy: 0
2025/03/30-11:04:47.344565 8029035584 Options.bottommost_compression_opts.max_dict_bytes: 0
2025/03/30-11:04:47.344565 8029035584 Options.bottommost_compression_opts.zstd_max_train_bytes: 0
2025/03/30-11:04:47.344565 8029035584 Options.bottommost_compression_opts.parallel_threads: 1
2025/03/30-11:04:47.344566 8029035584 Options.bottommost_compression_opts.enabled: false
2025/03/30-11:04:47.344566 8029035584 Options.bottommost_compression_opts.max_dict_buffer_bytes: 0
2025/03/30-11:04:47.344567 8029035584 Options.bottommost_compression_opts.use_zstd_dict_trainer: true
2025/03/30-11:04:47.344567 8029035584 Options.compression_opts.window_bits: -14
2025/03/30-11:04:47.344568 8029035584 Options.compression_opts.level: 32767
2025/03/30-11:04:47.344568 8029035584 Options.compression_opts.strategy: 0
2025/03/30-11:04:47.344568 8029035584 Options.compression_opts.max_dict_bytes: 0
2025/03/30-11:04:47.344569 8029035584 Options.compression_opts.zstd_max_train_bytes: 0
2025/03/30-11:04:47.344569 8029035584 Options.compression_opts.use_zstd_dict_trainer: true
2025/03/30-11:04:47.344570 8029035584 Options.compression_opts.parallel_threads: 1
2025/03/30-11:04:47.344570 8029035584 Options.compression_opts.enabled: false
2025/03/30-11:04:47.344570 8029035584 Options.compression_opts.max_dict_buffer_bytes: 0
2025/03/30-11:04:47.344571 8029035584 Options.level0_file_num_compaction_trigger: 4
2025/03/30-11:04:47.344571 8029035584 Options.level0_slowdown_writes_trigger: 20
2025/03/30-11:04:47.344572 8029035584 Options.level0_stop_writes_trigger: 36
2025/03/30-11:04:47.344572 8029035584 Options.target_file_size_base: 67108864
2025/03/30-11:04:47.344572 8029035584 Options.target_file_size_multiplier: 10
2025/03/30-11:04:47.344573 8029035584 Options.max_bytes_for_level_base: 268435456
2025/03/30-11:04:47.344573 8029035584 Options.level_compaction_dynamic_level_bytes: 1
2025/03/30-11:04:47.344574 8029035584 Options.max_bytes_for_level_multiplier: 10.000000
2025/03/30-11:04:47.344574 8029035584 Options.max_bytes_for_level_multiplier_addtl[0]: 1
2025/03/30-11:04:47.344575 8029035584 Options.max_bytes_for_level_multiplier_addtl[1]: 1
2025/03/30-11:04:47.344575 8029035584 Options.max_bytes_for_level_multiplier_addtl[2]: 1
2025/03/30-11:04:47.344575 8029035584 Options.max_bytes_for_level_multiplier_addtl[3]: 1
2025/03/30-11:04:47.344576 8029035584 Options.max_bytes_for_level_multiplier_addtl[4]: 1
2025/03/30-11:04:47.344576 8029035584 Options.max_bytes_for_level_multiplier_addtl[5]: 1
2025/03/30-11:04:47.344577 8029035584 Options.max_bytes_for_level_multiplier_addtl[6]: 1
2025/03/30-11:04:47.344577 8029035584 Options.max_sequential_skip_in_iterations: 8
2025/03/30-11:04:47.344577 8029035584 Options.max_compaction_bytes: 1677721600
2025/03/30-11:04:47.344578 8029035584 Options.ignore_max_compaction_bytes_for_input: true
2025/03/30-11:04:47.344578 8029035584 Options.arena_block_size: 1048576
2025/03/30-11:04:47.344579 8029035584 Options.soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-11:04:47.344579 8029035584 Options.hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-11:04:47.344580 8029035584 Options.disable_auto_compactions: 1
2025/03/30-11:04:47.344580 8029035584 Options.compaction_style: kCompactionStyleLevel
2025/03/30-11:04:47.344581 8029035584 Options.compaction_pri: kMinOverlappingRatio
2025/03/30-11:04:47.344581 8029035584 Options.compaction_options_universal.size_ratio: 1
2025/03/30-11:04:47.344581 8029035584 Options.compaction_options_universal.min_merge_width: 2
2025/03/30-11:04:47.344583 8029035584 Options.compaction_options_universal.max_merge_width: 4294967295
2025/03/30-11:04:47.344583 8029035584 Options.compaction_options_universal.max_size_amplification_percent: 200
2025/03/30-11:04:47.344583 8029035584 Options.compaction_options_universal.compression_size_percent: -1
2025/03/30-11:04:47.344584 8029035584 Options.compaction_options_universal.stop_style: kCompactionStopStyleTotalSize
2025/03/30-11:04:47.344584 8029035584 Options.compaction_options_fifo.max_table_files_size: 1073741824
2025/03/30-11:04:47.344585 8029035584 Options.compaction_options_fifo.allow_compaction: 0
2025/03/30-11:04:47.344585 8029035584 Options.table_properties_collectors:
2025/03/30-11:04:47.344586 8029035584 Options.inplace_update_support: 0
2025/03/30-11:04:47.344586 8029035584 Options.inplace_update_num_locks: 10000
2025/03/30-11:04:47.344587 8029035584 Options.memtable_prefix_bloom_size_ratio: 0.000000
2025/03/30-11:04:47.344587 8029035584 Options.memtable_whole_key_filtering: 0
2025/03/30-11:04:47.344587 8029035584 Options.memtable_huge_page_size: 0
2025/03/30-11:04:47.344588 8029035584 Options.bloom_locality: 0
2025/03/30-11:04:47.344588 8029035584 Options.max_successive_merges: 0
2025/03/30-11:04:47.344589 8029035584 Options.optimize_filters_for_hits: 0
2025/03/30-11:04:47.344589 8029035584 Options.paranoid_file_checks: 0
2025/03/30-11:04:47.344589 8029035584 Options.force_consistency_checks: 1
2025/03/30-11:04:47.344590 8029035584 Options.report_bg_io_stats: 0
2025/03/30-11:04:47.344590 8029035584 Options.ttl: 2592000
2025/03/30-11:04:47.344591 8029035584 Options.periodic_compaction_seconds: 0
2025/03/30-11:04:47.344591 8029035584 Options.preclude_last_level_data_seconds: 0
2025/03/30-11:04:47.344591 8029035584 Options.preserve_internal_time_seconds: 0
2025/03/30-11:04:47.344592 8029035584 Options.enable_blob_files: false
2025/03/30-11:04:47.344592 8029035584 Options.min_blob_size: 0
2025/03/30-11:04:47.344593 8029035584 Options.blob_file_size: 268435456
2025/03/30-11:04:47.344593 8029035584 Options.blob_compression_type: NoCompression
2025/03/30-11:04:47.344594 8029035584 Options.enable_blob_garbage_collection: false
2025/03/30-11:04:47.344594 8029035584 Options.blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-11:04:47.344594 8029035584 Options.blob_garbage_collection_force_threshold: 1.000000
2025/03/30-11:04:47.344595 8029035584 Options.blob_compaction_readahead_size: 0
2025/03/30-11:04:47.344595 8029035584 Options.blob_file_starting_level: 0
2025/03/30-11:04:47.344596 8029035584 Options.experimental_mempurge_threshold: 0.000000
2025/03/30-11:04:47.344596 8029035584 Options.memtable_max_range_deletions: 0
2025/03/30-11:04:47.344749 8029035584 [db/version_set.cc:5909] Recovered from manifest file:/Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts/MANIFEST-000019 succeeded,manifest_file_number is 19, next_file_number is 23, last_sequence is 3, log_number is 12,prev_log_number is 0,max_column_family is 0,min_log_number_to_keep is 0
2025/03/30-11:04:47.344750 8029035584 [db/version_set.cc:5918] Column family [default] (ID 0), log number is 12
2025/03/30-11:04:47.344781 8029035584 [db/db_impl/db_impl_open.cc:639] DB ID: 0e17eec6-49fd-4260-b9f6-242cf4d59760
2025/03/30-11:04:47.344826 8029035584 EVENT_LOG_v1 {"time_micros": 1743347087344824, "job": 1, "event": "recovery_started", "wal_files": [4, 11, 18]}
2025/03/30-11:04:47.344827 8029035584 [db/db_impl/db_impl_open.cc:1134] Recovering log #4 mode 2
2025/03/30-11:04:47.344847 8029035584 [db/db_impl/db_impl_open.cc:1134] Recovering log #11 mode 2
2025/03/30-11:04:47.344868 8029035584 [db/db_impl/db_impl_open.cc:1134] Recovering log #18 mode 2
2025/03/30-11:04:47.344921 8029035584 EVENT_LOG_v1 {"time_micros": 1743347087344919, "job": 1, "event": "recovery_finished"}
2025/03/30-11:04:47.344965 8029035584 [db/version_set.cc:5369] Creating manifest 25
2025/03/30-11:04:47.345761 8029035584 [db/db_impl/db_impl_open.cc:2121] SstFileManager instance 0x11f708000
2025/03/30-11:04:47.345780 8029035584 DB pointer 0x120020200
2025/03/30-11:04:47.345788 8029035584 [WARN] [utilities/transactions/pessimistic_transaction_db.cc:262] Transaction write_policy is 0
2025/03/30-11:04:47.346387 8029035584 [db/db_impl/db_impl.cc:1195] SetOptions() on column family [default], inputs:
2025/03/30-11:04:47.346388 8029035584 [db/db_impl/db_impl.cc:1198] disable_auto_compactions: false
2025/03/30-11:04:47.346389 8029035584 [db/db_impl/db_impl.cc:1202] [default] SetOptions() succeeded
2025/03/30-11:04:47.346389 8029035584 [options/cf_options.cc:1042] write_buffer_size: 67108864
2025/03/30-11:04:47.346390 8029035584 [options/cf_options.cc:1044] max_write_buffer_number: 2
2025/03/30-11:04:47.346390 8029035584 [options/cf_options.cc:1047] arena_block_size: 1048576
2025/03/30-11:04:47.346391 8029035584 [options/cf_options.cc:1049] memtable_prefix_bloom_ratio: 0.000000
2025/03/30-11:04:47.346391 8029035584 [options/cf_options.cc:1051] memtable_whole_key_filtering: 0
2025/03/30-11:04:47.346392 8029035584 [options/cf_options.cc:1054] memtable_huge_page_size: 0
2025/03/30-11:04:47.346392 8029035584 [options/cf_options.cc:1057] max_successive_merges: 0
2025/03/30-11:04:47.346393 8029035584 [options/cf_options.cc:1060] inplace_update_num_locks: 10000
2025/03/30-11:04:47.346393 8029035584 [options/cf_options.cc:1064] prefix_extractor: nullptr
2025/03/30-11:04:47.346393 8029035584 [options/cf_options.cc:1066] disable_auto_compactions: 0
2025/03/30-11:04:47.346394 8029035584 [options/cf_options.cc:1068] soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-11:04:47.346394 8029035584 [options/cf_options.cc:1070] hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-11:04:47.346395 8029035584 [options/cf_options.cc:1072] level0_file_num_compaction_trigger: 4
2025/03/30-11:04:47.346395 8029035584 [options/cf_options.cc:1074] level0_slowdown_writes_trigger: 20
2025/03/30-11:04:47.346396 8029035584 [options/cf_options.cc:1076] level0_stop_writes_trigger: 36
2025/03/30-11:04:47.346396 8029035584 [options/cf_options.cc:1078] max_compaction_bytes: 1677721600
2025/03/30-11:04:47.346397 8029035584 [options/cf_options.cc:1080] ignore_max_compaction_bytes_for_input: true
2025/03/30-11:04:47.346397 8029035584 [options/cf_options.cc:1082] target_file_size_base: 67108864
2025/03/30-11:04:47.346397 8029035584 [options/cf_options.cc:1084] target_file_size_multiplier: 10
2025/03/30-11:04:47.346398 8029035584 [options/cf_options.cc:1086] max_bytes_for_level_base: 268435456
2025/03/30-11:04:47.346398 8029035584 [options/cf_options.cc:1088] max_bytes_for_level_multiplier: 10.000000
2025/03/30-11:04:47.346399 8029035584 [options/cf_options.cc:1090] ttl: 2592000
2025/03/30-11:04:47.346399 8029035584 [options/cf_options.cc:1092] periodic_compaction_seconds: 0
2025/03/30-11:04:47.346400 8029035584 [options/cf_options.cc:1106] max_bytes_for_level_multiplier_additional: 1, 1, 1, 1, 1, 1, 1
2025/03/30-11:04:47.346401 8029035584 [options/cf_options.cc:1108] max_sequential_skip_in_iterations: 8
2025/03/30-11:04:47.346401 8029035584 [options/cf_options.cc:1110] check_flush_compaction_key_order: 1
2025/03/30-11:04:47.346401 8029035584 [options/cf_options.cc:1112] paranoid_file_checks: 0
2025/03/30-11:04:47.346402 8029035584 [options/cf_options.cc:1114] report_bg_io_stats: 0
2025/03/30-11:04:47.346402 8029035584 [options/cf_options.cc:1116] compression: 0
2025/03/30-11:04:47.346403 8029035584 [options/cf_options.cc:1119] experimental_mempurge_threshold: 0.000000
2025/03/30-11:04:47.346403 8029035584 [options/cf_options.cc:1123] compaction_options_universal.size_ratio : 1
2025/03/30-11:04:47.346403 8029035584 [options/cf_options.cc:1125] compaction_options_universal.min_merge_width : 2
2025/03/30-11:04:47.346404 8029035584 [options/cf_options.cc:1127] compaction_options_universal.max_merge_width : -1
2025/03/30-11:04:47.346404 8029035584 [options/cf_options.cc:1130] compaction_options_universal.max_size_amplification_percent : 200
2025/03/30-11:04:47.346405 8029035584 [options/cf_options.cc:1133] compaction_options_universal.compression_size_percent : -1
2025/03/30-11:04:47.346405 8029035584 [options/cf_options.cc:1135] compaction_options_universal.stop_style : 1
2025/03/30-11:04:47.346406 8029035584 [options/cf_options.cc:1138] compaction_options_universal.allow_trivial_move : 0
2025/03/30-11:04:47.346406 8029035584 [options/cf_options.cc:1140] compaction_options_universal.incremental : 0
2025/03/30-11:04:47.346407 8029035584 [options/cf_options.cc:1144] compaction_options_fifo.max_table_files_size : 1073741824
2025/03/30-11:04:47.346407 8029035584 [options/cf_options.cc:1146] compaction_options_fifo.allow_compaction : 0
2025/03/30-11:04:47.346407 8029035584 [options/cf_options.cc:1150] enable_blob_files: false
2025/03/30-11:04:47.346408 8029035584 [options/cf_options.cc:1152] min_blob_size: 0
2025/03/30-11:04:47.346408 8029035584 [options/cf_options.cc:1154] blob_file_size: 268435456
2025/03/30-11:04:47.346409 8029035584 [options/cf_options.cc:1156] blob_compression_type: NoCompression
2025/03/30-11:04:47.346409 8029035584 [options/cf_options.cc:1158] enable_blob_garbage_collection: false
2025/03/30-11:04:47.346410 8029035584 [options/cf_options.cc:1160] blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-11:04:47.346410 8029035584 [options/cf_options.cc:1162] blob_garbage_collection_force_threshold: 1.000000
2025/03/30-11:04:47.346411 8029035584 [options/cf_options.cc:1164] blob_compaction_readahead_size: 0
2025/03/30-11:04:47.346411 8029035584 [options/cf_options.cc:1166] blob_file_starting_level: 0
2025/03/30-11:04:47.346411 8029035584 [options/cf_options.cc:1170] prepopulate_blob_cache: disable
2025/03/30-11:04:47.346412 8029035584 [options/cf_options.cc:1172] last_level_temperature: 0
2025/03/30-11:04:50.347335 6198161408 [db/db_impl/db_impl.cc:1091] ------- DUMPING STATS -------
2025/03/30-11:04:50.347389 6198161408 [db/db_impl/db_impl.cc:1092]
** DB Stats **
Uptime(secs): 3.0 total, 3.0 interval
Cumulative writes: 0 writes, 0 keys, 0 commit groups, 0.0 writes per commit group, ingest: 0.00 GB, 0.00 MB/s
Cumulative WAL: 0 writes, 0 syncs, 0.00 writes per sync, written: 0.00 GB, 0.00 MB/s
Cumulative stall: 00:00:0.000 H:M:S, 0.0 percent
Interval writes: 0 writes, 0 keys, 0 commit groups, 0.0 writes per commit group, ingest: 0.00 MB, 0.00 MB/s
Interval WAL: 0 writes, 0 syncs, 0.00 writes per sync, written: 0.00 GB, 0.00 MB/s
Interval stall: 00:00:0.000 H:M:S, 0.0 percent
Write Stall (count): write-buffer-manager-limit-stops: 0
** Compaction Stats [default] **
Level Files Size Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
L0 2/0 2.52 KB 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00 0.00 0 0.000 0 0 0.0 0.0
Sum 2/0 2.52 KB 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00 0.00 0 0.000 0 0 0.0 0.0
Int 0/0 0.00 KB 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00 0.00 0 0.000 0 0 0.0 0.0
** Compaction Stats [default] **
Priority Files Size Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Blob file count: 0, total size: 0.0 GB, garbage size: 0.0 GB, space amp: 0.0
Uptime(secs): 3.0 total, 3.0 interval
Flush(GB): cumulative 0.000, interval 0.000
AddFile(GB): cumulative 0.000, interval 0.000
AddFile(Total Files): cumulative 0, interval 0
AddFile(L0 Files): cumulative 0, interval 0
AddFile(Keys): cumulative 0, interval 0
Cumulative compaction: 0.00 GB write, 0.00 MB/s write, 0.00 GB read, 0.00 MB/s read, 0.0 seconds
Interval compaction: 0.00 GB write, 0.00 MB/s write, 0.00 GB read, 0.00 MB/s read, 0.0 seconds
Write Stall (count): cf-l0-file-count-limit-delays-with-ongoing-compaction: 0, cf-l0-file-count-limit-stops-with-ongoing-compaction: 0, l0-file-count-limit-delays: 0, l0-file-count-limit-stops: 0, memtable-limit-delays: 0, memtable-limit-stops: 0, pending-compaction-bytes-delays: 0, pending-compaction-bytes-stops: 0, total-delays: 0, total-stops: 0
Block cache LRUCache@0x600001a70798#98197 capacity: 64.00 MB seed: 152519891 usage: 0.88 KB table_size: 1024 occupancy: 5 collections: 1 last_copies: 0 last_secs: 0.000203 secs_since: 0
Block cache entry stats(count,size,portion): FilterBlock(2,0.20 KB,0.000301003%) IndexBlock(2,0.26 KB,0.000399351%) Misc(1,0.00 KB,0%)
** File Read Latency Histogram By Level [default] **

@ -1,300 +0,0 @@
2025/03/30-10:54:54.640132 8029035584 RocksDB version: 8.6.0
2025/03/30-10:54:54.640157 8029035584 Compile date 2023-06-15 05:32:14
2025/03/30-10:54:54.640158 8029035584 DB SUMMARY
2025/03/30-10:54:54.640158 8029035584 DB Session ID: KY92ZR8LCBK63UYA6SDJ
2025/03/30-10:54:54.640183 8029035584 SST files in /Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts dir, Total Num: 0, files:
2025/03/30-10:54:54.640183 8029035584 Write Ahead Log file in /Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts:
2025/03/30-10:54:54.640184 8029035584 Options.error_if_exists: 0
2025/03/30-10:54:54.640185 8029035584 Options.create_if_missing: 1
2025/03/30-10:54:54.640185 8029035584 Options.paranoid_checks: 1
2025/03/30-10:54:54.640186 8029035584 Options.flush_verify_memtable_count: 1
2025/03/30-10:54:54.640186 8029035584 Options.compaction_verify_record_count: 1
2025/03/30-10:54:54.640186 8029035584 Options.track_and_verify_wals_in_manifest: 0
2025/03/30-10:54:54.640187 8029035584 Options.verify_sst_unique_id_in_manifest: 1
2025/03/30-10:54:54.640187 8029035584 Options.env: 0x6000035a8120
2025/03/30-10:54:54.640188 8029035584 Options.fs: EncryptedFileSystem
2025/03/30-10:54:54.640188 8029035584 Options.info_log: 0x12e705298
2025/03/30-10:54:54.640189 8029035584 Options.max_file_opening_threads: 16
2025/03/30-10:54:54.640189 8029035584 Options.statistics: 0x0
2025/03/30-10:54:54.640190 8029035584 Options.use_fsync: 0
2025/03/30-10:54:54.640190 8029035584 Options.max_log_file_size: 0
2025/03/30-10:54:54.640191 8029035584 Options.max_manifest_file_size: 1073741824
2025/03/30-10:54:54.640191 8029035584 Options.log_file_time_to_roll: 0
2025/03/30-10:54:54.640192 8029035584 Options.keep_log_file_num: 1000
2025/03/30-10:54:54.640192 8029035584 Options.recycle_log_file_num: 0
2025/03/30-10:54:54.640193 8029035584 Options.allow_fallocate: 1
2025/03/30-10:54:54.640193 8029035584 Options.allow_mmap_reads: 0
2025/03/30-10:54:54.640194 8029035584 Options.allow_mmap_writes: 0
2025/03/30-10:54:54.640194 8029035584 Options.use_direct_reads: 0
2025/03/30-10:54:54.640195 8029035584 Options.use_direct_io_for_flush_and_compaction: 0
2025/03/30-10:54:54.640195 8029035584 Options.create_missing_column_families: 1
2025/03/30-10:54:54.640196 8029035584 Options.db_log_dir:
2025/03/30-10:54:54.640196 8029035584 Options.wal_dir:
2025/03/30-10:54:54.640197 8029035584 Options.table_cache_numshardbits: 6
2025/03/30-10:54:54.640197 8029035584 Options.WAL_ttl_seconds: 0
2025/03/30-10:54:54.640198 8029035584 Options.WAL_size_limit_MB: 0
2025/03/30-10:54:54.640198 8029035584 Options.max_write_batch_group_size_bytes: 1048576
2025/03/30-10:54:54.640198 8029035584 Options.manifest_preallocation_size: 4194304
2025/03/30-10:54:54.640199 8029035584 Options.is_fd_close_on_exec: 1
2025/03/30-10:54:54.640199 8029035584 Options.advise_random_on_open: 1
2025/03/30-10:54:54.640200 8029035584 Options.db_write_buffer_size: 67108864
2025/03/30-10:54:54.640200 8029035584 Options.write_buffer_manager: 0x600002ab9ba0
2025/03/30-10:54:54.640201 8029035584 Options.access_hint_on_compaction_start: 1
2025/03/30-10:54:54.640201 8029035584 Options.random_access_max_buffer_size: 1048576
2025/03/30-10:54:54.640202 8029035584 Options.use_adaptive_mutex: 0
2025/03/30-10:54:54.640202 8029035584 Options.rate_limiter: 0x0
2025/03/30-10:54:54.640203 8029035584 Options.sst_file_manager.rate_bytes_per_sec: 0
2025/03/30-10:54:54.640203 8029035584 Options.wal_recovery_mode: 2
2025/03/30-10:54:54.640204 8029035584 Options.enable_thread_tracking: 0
2025/03/30-10:54:54.640204 8029035584 Options.enable_pipelined_write: 0
2025/03/30-10:54:54.640205 8029035584 Options.unordered_write: 0
2025/03/30-10:54:54.640205 8029035584 Options.allow_concurrent_memtable_write: 1
2025/03/30-10:54:54.640206 8029035584 Options.enable_write_thread_adaptive_yield: 1
2025/03/30-10:54:54.640206 8029035584 Options.write_thread_max_yield_usec: 100
2025/03/30-10:54:54.640207 8029035584 Options.write_thread_slow_yield_usec: 3
2025/03/30-10:54:54.640207 8029035584 Options.row_cache: None
2025/03/30-10:54:54.640208 8029035584 Options.wal_filter: None
2025/03/30-10:54:54.640208 8029035584 Options.avoid_flush_during_recovery: 0
2025/03/30-10:54:54.640209 8029035584 Options.allow_ingest_behind: 0
2025/03/30-10:54:54.640209 8029035584 Options.two_write_queues: 0
2025/03/30-10:54:54.640210 8029035584 Options.manual_wal_flush: 0
2025/03/30-10:54:54.640210 8029035584 Options.wal_compression: 0
2025/03/30-10:54:54.640211 8029035584 Options.atomic_flush: 0
2025/03/30-10:54:54.640211 8029035584 Options.avoid_unnecessary_blocking_io: 0
2025/03/30-10:54:54.640212 8029035584 Options.persist_stats_to_disk: 0
2025/03/30-10:54:54.640212 8029035584 Options.write_dbid_to_manifest: 0
2025/03/30-10:54:54.640212 8029035584 Options.log_readahead_size: 0
2025/03/30-10:54:54.640213 8029035584 Options.file_checksum_gen_factory: Unknown
2025/03/30-10:54:54.640214 8029035584 Options.best_efforts_recovery: 0
2025/03/30-10:54:54.640214 8029035584 Options.max_bgerror_resume_count: 2147483647
2025/03/30-10:54:54.640215 8029035584 Options.bgerror_resume_retry_interval: 1000000
2025/03/30-10:54:54.640215 8029035584 Options.allow_data_in_errors: 0
2025/03/30-10:54:54.640215 8029035584 Options.db_host_id: __hostname__
2025/03/30-10:54:54.640216 8029035584 Options.enforce_single_del_contracts: true
2025/03/30-10:54:54.640216 8029035584 Options.max_background_jobs: 12
2025/03/30-10:54:54.640217 8029035584 Options.max_background_compactions: -1
2025/03/30-10:54:54.640217 8029035584 Options.max_subcompactions: 1
2025/03/30-10:54:54.640218 8029035584 Options.avoid_flush_during_shutdown: 0
2025/03/30-10:54:54.640218 8029035584 Options.writable_file_max_buffer_size: 1048576
2025/03/30-10:54:54.640219 8029035584 Options.delayed_write_rate : 16777216
2025/03/30-10:54:54.640219 8029035584 Options.max_total_wal_size: 1073741824
2025/03/30-10:54:54.640220 8029035584 Options.delete_obsolete_files_period_micros: 21600000000
2025/03/30-10:54:54.640220 8029035584 Options.stats_dump_period_sec: 600
2025/03/30-10:54:54.640221 8029035584 Options.stats_persist_period_sec: 600
2025/03/30-10:54:54.640221 8029035584 Options.stats_history_buffer_size: 1048576
2025/03/30-10:54:54.640222 8029035584 Options.max_open_files: -1
2025/03/30-10:54:54.640222 8029035584 Options.bytes_per_sync: 0
2025/03/30-10:54:54.640223 8029035584 Options.wal_bytes_per_sync: 0
2025/03/30-10:54:54.640223 8029035584 Options.strict_bytes_per_sync: 0
2025/03/30-10:54:54.640224 8029035584 Options.compaction_readahead_size: 2097152
2025/03/30-10:54:54.640224 8029035584 Options.max_background_flushes: -1
2025/03/30-10:54:54.640225 8029035584 Compression algorithms supported:
2025/03/30-10:54:54.640225 8029035584 kZSTD supported: 0
2025/03/30-10:54:54.640226 8029035584 kZlibCompression supported: 0
2025/03/30-10:54:54.640226 8029035584 kXpressCompression supported: 0
2025/03/30-10:54:54.640227 8029035584 kSnappyCompression supported: 0
2025/03/30-10:54:54.640227 8029035584 kZSTDNotFinalCompression supported: 0
2025/03/30-10:54:54.640228 8029035584 kLZ4HCCompression supported: 0
2025/03/30-10:54:54.640228 8029035584 kLZ4Compression supported: 0
2025/03/30-10:54:54.640229 8029035584 kBZip2Compression supported: 0
2025/03/30-10:54:54.640232 8029035584 Fast CRC32 supported: Supported on Arm64
2025/03/30-10:54:54.640233 8029035584 DMutex implementation: pthread_mutex_t
2025/03/30-10:54:54.640459 8029035584 [db/db_impl/db_impl_open.cc:319] Creating manifest 1
2025/03/30-10:54:54.640757 8029035584 [db/version_set.cc:5858] Recovering from manifest file: /Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts/MANIFEST-000001
2025/03/30-10:54:54.640779 8029035584 [db/column_family.cc:617] --------------- Options for column family [default]:
2025/03/30-10:54:54.640779 8029035584 Options.comparator: leveldb.BytewiseComparator
2025/03/30-10:54:54.640780 8029035584 Options.merge_operator: None
2025/03/30-10:54:54.640780 8029035584 Options.compaction_filter: None
2025/03/30-10:54:54.640781 8029035584 Options.compaction_filter_factory: None
2025/03/30-10:54:54.640782 8029035584 Options.sst_partitioner_factory: None
2025/03/30-10:54:54.640782 8029035584 Options.memtable_factory: SkipListFactory
2025/03/30-10:54:54.640782 8029035584 Options.table_factory: BlockBasedTable
2025/03/30-10:54:54.640790 8029035584 table_factory options: flush_block_policy_factory: FlushBlockBySizePolicyFactory (0x600001192360)
cache_index_and_filter_blocks: 1
cache_index_and_filter_blocks_with_high_priority: 1
pin_l0_filter_and_index_blocks_in_cache: 1
pin_top_level_index_and_filter: 1
index_type: 0
data_block_index_type: 0
index_shortening: 1
data_block_hash_table_util_ratio: 0.750000
checksum: 4
no_block_cache: 0
block_cache: 0x6000024a43d8
block_cache_name: LRUCache
block_cache_options:
capacity : 67108864
num_shard_bits : 6
strict_capacity_limit : 0
memory_allocator : None
high_pri_pool_ratio: 0.500
low_pri_pool_ratio: 0.000
persistent_cache: 0x0
block_size: 16384
block_size_deviation: 10
block_restart_interval: 16
index_block_restart_interval: 1
metadata_block_size: 4096
partition_filters: 0
use_delta_encoding: 1
filter_policy: bloomfilter
whole_key_filtering: 1
verify_compression: 0
read_amp_bytes_per_bit: 0
format_version: 6
enable_index_compression: 1
block_align: 0
max_auto_readahead_size: 262144
prepopulate_block_cache: 0
initial_auto_readahead_size: 8192
num_file_reads_for_auto_readahead: 2
2025/03/30-10:54:54.640791 8029035584 Options.write_buffer_size: 67108864
2025/03/30-10:54:54.640792 8029035584 Options.max_write_buffer_number: 2
2025/03/30-10:54:54.640792 8029035584 Options.compression: NoCompression
2025/03/30-10:54:54.640793 8029035584 Options.bottommost_compression: Disabled
2025/03/30-10:54:54.640793 8029035584 Options.prefix_extractor: nullptr
2025/03/30-10:54:54.640794 8029035584 Options.memtable_insert_with_hint_prefix_extractor: nullptr
2025/03/30-10:54:54.640794 8029035584 Options.num_levels: 7
2025/03/30-10:54:54.640795 8029035584 Options.min_write_buffer_number_to_merge: 1
2025/03/30-10:54:54.640795 8029035584 Options.max_write_buffer_number_to_maintain: 0
2025/03/30-10:54:54.640796 8029035584 Options.max_write_buffer_size_to_maintain: 134217728
2025/03/30-10:54:54.640796 8029035584 Options.bottommost_compression_opts.window_bits: -14
2025/03/30-10:54:54.640797 8029035584 Options.bottommost_compression_opts.level: 32767
2025/03/30-10:54:54.640797 8029035584 Options.bottommost_compression_opts.strategy: 0
2025/03/30-10:54:54.640798 8029035584 Options.bottommost_compression_opts.max_dict_bytes: 0
2025/03/30-10:54:54.640798 8029035584 Options.bottommost_compression_opts.zstd_max_train_bytes: 0
2025/03/30-10:54:54.640799 8029035584 Options.bottommost_compression_opts.parallel_threads: 1
2025/03/30-10:54:54.640799 8029035584 Options.bottommost_compression_opts.enabled: false
2025/03/30-10:54:54.640800 8029035584 Options.bottommost_compression_opts.max_dict_buffer_bytes: 0
2025/03/30-10:54:54.640800 8029035584 Options.bottommost_compression_opts.use_zstd_dict_trainer: true
2025/03/30-10:54:54.640801 8029035584 Options.compression_opts.window_bits: -14
2025/03/30-10:54:54.640801 8029035584 Options.compression_opts.level: 32767
2025/03/30-10:54:54.640802 8029035584 Options.compression_opts.strategy: 0
2025/03/30-10:54:54.640802 8029035584 Options.compression_opts.max_dict_bytes: 0
2025/03/30-10:54:54.640802 8029035584 Options.compression_opts.zstd_max_train_bytes: 0
2025/03/30-10:54:54.640803 8029035584 Options.compression_opts.use_zstd_dict_trainer: true
2025/03/30-10:54:54.640803 8029035584 Options.compression_opts.parallel_threads: 1
2025/03/30-10:54:54.640804 8029035584 Options.compression_opts.enabled: false
2025/03/30-10:54:54.640804 8029035584 Options.compression_opts.max_dict_buffer_bytes: 0
2025/03/30-10:54:54.640805 8029035584 Options.level0_file_num_compaction_trigger: 4
2025/03/30-10:54:54.640805 8029035584 Options.level0_slowdown_writes_trigger: 20
2025/03/30-10:54:54.640806 8029035584 Options.level0_stop_writes_trigger: 36
2025/03/30-10:54:54.640806 8029035584 Options.target_file_size_base: 67108864
2025/03/30-10:54:54.640807 8029035584 Options.target_file_size_multiplier: 10
2025/03/30-10:54:54.640807 8029035584 Options.max_bytes_for_level_base: 268435456
2025/03/30-10:54:54.640808 8029035584 Options.level_compaction_dynamic_level_bytes: 1
2025/03/30-10:54:54.640808 8029035584 Options.max_bytes_for_level_multiplier: 10.000000
2025/03/30-10:54:54.640809 8029035584 Options.max_bytes_for_level_multiplier_addtl[0]: 1
2025/03/30-10:54:54.640809 8029035584 Options.max_bytes_for_level_multiplier_addtl[1]: 1
2025/03/30-10:54:54.640810 8029035584 Options.max_bytes_for_level_multiplier_addtl[2]: 1
2025/03/30-10:54:54.640810 8029035584 Options.max_bytes_for_level_multiplier_addtl[3]: 1
2025/03/30-10:54:54.640811 8029035584 Options.max_bytes_for_level_multiplier_addtl[4]: 1
2025/03/30-10:54:54.640811 8029035584 Options.max_bytes_for_level_multiplier_addtl[5]: 1
2025/03/30-10:54:54.640812 8029035584 Options.max_bytes_for_level_multiplier_addtl[6]: 1
2025/03/30-10:54:54.640812 8029035584 Options.max_sequential_skip_in_iterations: 8
2025/03/30-10:54:54.640813 8029035584 Options.max_compaction_bytes: 1677721600
2025/03/30-10:54:54.640813 8029035584 Options.ignore_max_compaction_bytes_for_input: true
2025/03/30-10:54:54.640814 8029035584 Options.arena_block_size: 1048576
2025/03/30-10:54:54.640814 8029035584 Options.soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-10:54:54.640815 8029035584 Options.hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-10:54:54.640815 8029035584 Options.disable_auto_compactions: 1
2025/03/30-10:54:54.640816 8029035584 Options.compaction_style: kCompactionStyleLevel
2025/03/30-10:54:54.640816 8029035584 Options.compaction_pri: kMinOverlappingRatio
2025/03/30-10:54:54.640817 8029035584 Options.compaction_options_universal.size_ratio: 1
2025/03/30-10:54:54.640817 8029035584 Options.compaction_options_universal.min_merge_width: 2
2025/03/30-10:54:54.640818 8029035584 Options.compaction_options_universal.max_merge_width: 4294967295
2025/03/30-10:54:54.640818 8029035584 Options.compaction_options_universal.max_size_amplification_percent: 200
2025/03/30-10:54:54.640819 8029035584 Options.compaction_options_universal.compression_size_percent: -1
2025/03/30-10:54:54.640820 8029035584 Options.compaction_options_universal.stop_style: kCompactionStopStyleTotalSize
2025/03/30-10:54:54.640821 8029035584 Options.compaction_options_fifo.max_table_files_size: 1073741824
2025/03/30-10:54:54.640821 8029035584 Options.compaction_options_fifo.allow_compaction: 0
2025/03/30-10:54:54.640822 8029035584 Options.table_properties_collectors:
2025/03/30-10:54:54.640822 8029035584 Options.inplace_update_support: 0
2025/03/30-10:54:54.640823 8029035584 Options.inplace_update_num_locks: 10000
2025/03/30-10:54:54.640823 8029035584 Options.memtable_prefix_bloom_size_ratio: 0.000000
2025/03/30-10:54:54.640824 8029035584 Options.memtable_whole_key_filtering: 0
2025/03/30-10:54:54.640824 8029035584 Options.memtable_huge_page_size: 0
2025/03/30-10:54:54.640825 8029035584 Options.bloom_locality: 0
2025/03/30-10:54:54.640825 8029035584 Options.max_successive_merges: 0
2025/03/30-10:54:54.640826 8029035584 Options.optimize_filters_for_hits: 0
2025/03/30-10:54:54.640826 8029035584 Options.paranoid_file_checks: 0
2025/03/30-10:54:54.640827 8029035584 Options.force_consistency_checks: 1
2025/03/30-10:54:54.640827 8029035584 Options.report_bg_io_stats: 0
2025/03/30-10:54:54.640828 8029035584 Options.ttl: 2592000
2025/03/30-10:54:54.640828 8029035584 Options.periodic_compaction_seconds: 0
2025/03/30-10:54:54.640829 8029035584 Options.preclude_last_level_data_seconds: 0
2025/03/30-10:54:54.640829 8029035584 Options.preserve_internal_time_seconds: 0
2025/03/30-10:54:54.640829 8029035584 Options.enable_blob_files: false
2025/03/30-10:54:54.640830 8029035584 Options.min_blob_size: 0
2025/03/30-10:54:54.640830 8029035584 Options.blob_file_size: 268435456
2025/03/30-10:54:54.640831 8029035584 Options.blob_compression_type: NoCompression
2025/03/30-10:54:54.640831 8029035584 Options.enable_blob_garbage_collection: false
2025/03/30-10:54:54.640832 8029035584 Options.blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-10:54:54.640832 8029035584 Options.blob_garbage_collection_force_threshold: 1.000000
2025/03/30-10:54:54.640833 8029035584 Options.blob_compaction_readahead_size: 0
2025/03/30-10:54:54.640833 8029035584 Options.blob_file_starting_level: 0
2025/03/30-10:54:54.640834 8029035584 Options.experimental_mempurge_threshold: 0.000000
2025/03/30-10:54:54.640834 8029035584 Options.memtable_max_range_deletions: 0
2025/03/30-10:54:54.640978 8029035584 [db/version_set.cc:5909] Recovered from manifest file:/Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts/MANIFEST-000001 succeeded,manifest_file_number is 1, next_file_number is 3, last_sequence is 0, log_number is 0,prev_log_number is 0,max_column_family is 0,min_log_number_to_keep is 0
2025/03/30-10:54:54.640980 8029035584 [db/version_set.cc:5918] Column family [default] (ID 0), log number is 0
2025/03/30-10:54:54.641007 8029035584 [db/db_impl/db_impl_open.cc:639] DB ID: 0e17eec6-49fd-4260-b9f6-242cf4d59760
2025/03/30-10:54:54.641141 8029035584 [db/version_set.cc:5369] Creating manifest 5
2025/03/30-10:54:54.642055 8029035584 [db/db_impl/db_impl_open.cc:2121] SstFileManager instance 0x12e70d880
2025/03/30-10:54:54.642081 8029035584 DB pointer 0x139044c00
2025/03/30-10:54:54.642089 8029035584 [WARN] [utilities/transactions/pessimistic_transaction_db.cc:262] Transaction write_policy is 0
2025/03/30-10:54:54.642640 8029035584 [db/db_impl/db_impl.cc:1195] SetOptions() on column family [default], inputs:
2025/03/30-10:54:54.642641 8029035584 [db/db_impl/db_impl.cc:1198] disable_auto_compactions: false
2025/03/30-10:54:54.642642 8029035584 [db/db_impl/db_impl.cc:1202] [default] SetOptions() succeeded
2025/03/30-10:54:54.642643 8029035584 [options/cf_options.cc:1042] write_buffer_size: 67108864
2025/03/30-10:54:54.642643 8029035584 [options/cf_options.cc:1044] max_write_buffer_number: 2
2025/03/30-10:54:54.642644 8029035584 [options/cf_options.cc:1047] arena_block_size: 1048576
2025/03/30-10:54:54.642644 8029035584 [options/cf_options.cc:1049] memtable_prefix_bloom_ratio: 0.000000
2025/03/30-10:54:54.642645 8029035584 [options/cf_options.cc:1051] memtable_whole_key_filtering: 0
2025/03/30-10:54:54.642645 8029035584 [options/cf_options.cc:1054] memtable_huge_page_size: 0
2025/03/30-10:54:54.642646 8029035584 [options/cf_options.cc:1057] max_successive_merges: 0
2025/03/30-10:54:54.642646 8029035584 [options/cf_options.cc:1060] inplace_update_num_locks: 10000
2025/03/30-10:54:54.642647 8029035584 [options/cf_options.cc:1064] prefix_extractor: nullptr
2025/03/30-10:54:54.642648 8029035584 [options/cf_options.cc:1066] disable_auto_compactions: 0
2025/03/30-10:54:54.642648 8029035584 [options/cf_options.cc:1068] soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-10:54:54.642649 8029035584 [options/cf_options.cc:1070] hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-10:54:54.642649 8029035584 [options/cf_options.cc:1072] level0_file_num_compaction_trigger: 4
2025/03/30-10:54:54.642650 8029035584 [options/cf_options.cc:1074] level0_slowdown_writes_trigger: 20
2025/03/30-10:54:54.642650 8029035584 [options/cf_options.cc:1076] level0_stop_writes_trigger: 36
2025/03/30-10:54:54.642651 8029035584 [options/cf_options.cc:1078] max_compaction_bytes: 1677721600
2025/03/30-10:54:54.642651 8029035584 [options/cf_options.cc:1080] ignore_max_compaction_bytes_for_input: true
2025/03/30-10:54:54.642652 8029035584 [options/cf_options.cc:1082] target_file_size_base: 67108864
2025/03/30-10:54:54.642652 8029035584 [options/cf_options.cc:1084] target_file_size_multiplier: 10
2025/03/30-10:54:54.642653 8029035584 [options/cf_options.cc:1086] max_bytes_for_level_base: 268435456
2025/03/30-10:54:54.642653 8029035584 [options/cf_options.cc:1088] max_bytes_for_level_multiplier: 10.000000
2025/03/30-10:54:54.642654 8029035584 [options/cf_options.cc:1090] ttl: 2592000
2025/03/30-10:54:54.642655 8029035584 [options/cf_options.cc:1092] periodic_compaction_seconds: 0
2025/03/30-10:54:54.642656 8029035584 [options/cf_options.cc:1106] max_bytes_for_level_multiplier_additional: 1, 1, 1, 1, 1, 1, 1
2025/03/30-10:54:54.642656 8029035584 [options/cf_options.cc:1108] max_sequential_skip_in_iterations: 8
2025/03/30-10:54:54.642657 8029035584 [options/cf_options.cc:1110] check_flush_compaction_key_order: 1
2025/03/30-10:54:54.642657 8029035584 [options/cf_options.cc:1112] paranoid_file_checks: 0
2025/03/30-10:54:54.642658 8029035584 [options/cf_options.cc:1114] report_bg_io_stats: 0
2025/03/30-10:54:54.642658 8029035584 [options/cf_options.cc:1116] compression: 0
2025/03/30-10:54:54.642659 8029035584 [options/cf_options.cc:1119] experimental_mempurge_threshold: 0.000000
2025/03/30-10:54:54.642659 8029035584 [options/cf_options.cc:1123] compaction_options_universal.size_ratio : 1
2025/03/30-10:54:54.642660 8029035584 [options/cf_options.cc:1125] compaction_options_universal.min_merge_width : 2
2025/03/30-10:54:54.642660 8029035584 [options/cf_options.cc:1127] compaction_options_universal.max_merge_width : -1
2025/03/30-10:54:54.642661 8029035584 [options/cf_options.cc:1130] compaction_options_universal.max_size_amplification_percent : 200
2025/03/30-10:54:54.642661 8029035584 [options/cf_options.cc:1133] compaction_options_universal.compression_size_percent : -1
2025/03/30-10:54:54.642662 8029035584 [options/cf_options.cc:1135] compaction_options_universal.stop_style : 1
2025/03/30-10:54:54.642662 8029035584 [options/cf_options.cc:1138] compaction_options_universal.allow_trivial_move : 0
2025/03/30-10:54:54.642663 8029035584 [options/cf_options.cc:1140] compaction_options_universal.incremental : 0
2025/03/30-10:54:54.642663 8029035584 [options/cf_options.cc:1144] compaction_options_fifo.max_table_files_size : 1073741824
2025/03/30-10:54:54.642664 8029035584 [options/cf_options.cc:1146] compaction_options_fifo.allow_compaction : 0
2025/03/30-10:54:54.642665 8029035584 [options/cf_options.cc:1150] enable_blob_files: false
2025/03/30-10:54:54.642665 8029035584 [options/cf_options.cc:1152] min_blob_size: 0
2025/03/30-10:54:54.642666 8029035584 [options/cf_options.cc:1154] blob_file_size: 268435456
2025/03/30-10:54:54.642666 8029035584 [options/cf_options.cc:1156] blob_compression_type: NoCompression
2025/03/30-10:54:54.642667 8029035584 [options/cf_options.cc:1158] enable_blob_garbage_collection: false
2025/03/30-10:54:54.642667 8029035584 [options/cf_options.cc:1160] blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-10:54:54.642668 8029035584 [options/cf_options.cc:1162] blob_garbage_collection_force_threshold: 1.000000
2025/03/30-10:54:54.642668 8029035584 [options/cf_options.cc:1164] blob_compaction_readahead_size: 0
2025/03/30-10:54:54.642669 8029035584 [options/cf_options.cc:1166] blob_file_starting_level: 0
2025/03/30-10:54:54.642669 8029035584 [options/cf_options.cc:1170] prepopulate_blob_cache: disable
2025/03/30-10:54:54.642670 8029035584 [options/cf_options.cc:1172] last_level_temperature: 0
2025/03/30-10:54:54.642872 8029035584 [db/db_impl/db_impl.cc:496] Shutdown: canceling all background work
2025/03/30-10:54:54.642977 8029035584 [db/db_impl/db_impl.cc:698] Shutdown complete

@ -1,343 +0,0 @@
2025/03/30-10:54:54.643263 8029035584 RocksDB version: 8.6.0
2025/03/30-10:54:54.643289 8029035584 Compile date 2023-06-15 05:32:14
2025/03/30-10:54:54.643289 8029035584 DB SUMMARY
2025/03/30-10:54:54.643290 8029035584 DB Session ID: KY92ZR8LCBK63UYA6SDG
2025/03/30-10:54:54.643339 8029035584 CURRENT file: CURRENT
2025/03/30-10:54:54.643340 8029035584 IDENTITY file: IDENTITY
2025/03/30-10:54:54.643343 8029035584 MANIFEST file: MANIFEST-000005 size: 83 Bytes
2025/03/30-10:54:54.643344 8029035584 SST files in /Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts dir, Total Num: 0, files:
2025/03/30-10:54:54.643345 8029035584 Write Ahead Log file in /Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts: 000004.log size: 113 ;
2025/03/30-10:54:54.643346 8029035584 Options.error_if_exists: 0
2025/03/30-10:54:54.643347 8029035584 Options.create_if_missing: 1
2025/03/30-10:54:54.643347 8029035584 Options.paranoid_checks: 1
2025/03/30-10:54:54.643348 8029035584 Options.flush_verify_memtable_count: 1
2025/03/30-10:54:54.643348 8029035584 Options.compaction_verify_record_count: 1
2025/03/30-10:54:54.643349 8029035584 Options.track_and_verify_wals_in_manifest: 0
2025/03/30-10:54:54.643349 8029035584 Options.verify_sst_unique_id_in_manifest: 1
2025/03/30-10:54:54.643350 8029035584 Options.env: 0x6000035a84e0
2025/03/30-10:54:54.643350 8029035584 Options.fs: EncryptedFileSystem
2025/03/30-10:54:54.643351 8029035584 Options.info_log: 0x12e705298
2025/03/30-10:54:54.643351 8029035584 Options.max_file_opening_threads: 16
2025/03/30-10:54:54.643352 8029035584 Options.statistics: 0x0
2025/03/30-10:54:54.643352 8029035584 Options.use_fsync: 0
2025/03/30-10:54:54.643353 8029035584 Options.max_log_file_size: 0
2025/03/30-10:54:54.643353 8029035584 Options.max_manifest_file_size: 1073741824
2025/03/30-10:54:54.643354 8029035584 Options.log_file_time_to_roll: 0
2025/03/30-10:54:54.643354 8029035584 Options.keep_log_file_num: 1000
2025/03/30-10:54:54.643355 8029035584 Options.recycle_log_file_num: 0
2025/03/30-10:54:54.643355 8029035584 Options.allow_fallocate: 1
2025/03/30-10:54:54.643356 8029035584 Options.allow_mmap_reads: 0
2025/03/30-10:54:54.643356 8029035584 Options.allow_mmap_writes: 0
2025/03/30-10:54:54.643357 8029035584 Options.use_direct_reads: 0
2025/03/30-10:54:54.643357 8029035584 Options.use_direct_io_for_flush_and_compaction: 0
2025/03/30-10:54:54.643358 8029035584 Options.create_missing_column_families: 1
2025/03/30-10:54:54.643358 8029035584 Options.db_log_dir:
2025/03/30-10:54:54.643359 8029035584 Options.wal_dir:
2025/03/30-10:54:54.643359 8029035584 Options.table_cache_numshardbits: 6
2025/03/30-10:54:54.643360 8029035584 Options.WAL_ttl_seconds: 0
2025/03/30-10:54:54.643360 8029035584 Options.WAL_size_limit_MB: 0
2025/03/30-10:54:54.643361 8029035584 Options.max_write_batch_group_size_bytes: 1048576
2025/03/30-10:54:54.643361 8029035584 Options.manifest_preallocation_size: 4194304
2025/03/30-10:54:54.643362 8029035584 Options.is_fd_close_on_exec: 1
2025/03/30-10:54:54.643362 8029035584 Options.advise_random_on_open: 1
2025/03/30-10:54:54.643363 8029035584 Options.db_write_buffer_size: 67108864
2025/03/30-10:54:54.643363 8029035584 Options.write_buffer_manager: 0x600002ab9ba0
2025/03/30-10:54:54.643364 8029035584 Options.access_hint_on_compaction_start: 1
2025/03/30-10:54:54.643364 8029035584 Options.random_access_max_buffer_size: 1048576
2025/03/30-10:54:54.643365 8029035584 Options.use_adaptive_mutex: 0
2025/03/30-10:54:54.643365 8029035584 Options.rate_limiter: 0x0
2025/03/30-10:54:54.643366 8029035584 Options.sst_file_manager.rate_bytes_per_sec: 0
2025/03/30-10:54:54.643366 8029035584 Options.wal_recovery_mode: 2
2025/03/30-10:54:54.643367 8029035584 Options.enable_thread_tracking: 0
2025/03/30-10:54:54.643367 8029035584 Options.enable_pipelined_write: 0
2025/03/30-10:54:54.643368 8029035584 Options.unordered_write: 0
2025/03/30-10:54:54.643368 8029035584 Options.allow_concurrent_memtable_write: 1
2025/03/30-10:54:54.643369 8029035584 Options.enable_write_thread_adaptive_yield: 1
2025/03/30-10:54:54.643369 8029035584 Options.write_thread_max_yield_usec: 100
2025/03/30-10:54:54.643370 8029035584 Options.write_thread_slow_yield_usec: 3
2025/03/30-10:54:54.643370 8029035584 Options.row_cache: None
2025/03/30-10:54:54.643371 8029035584 Options.wal_filter: None
2025/03/30-10:54:54.643371 8029035584 Options.avoid_flush_during_recovery: 0
2025/03/30-10:54:54.643372 8029035584 Options.allow_ingest_behind: 0
2025/03/30-10:54:54.643373 8029035584 Options.two_write_queues: 0
2025/03/30-10:54:54.643373 8029035584 Options.manual_wal_flush: 0
2025/03/30-10:54:54.643373 8029035584 Options.wal_compression: 0
2025/03/30-10:54:54.643374 8029035584 Options.atomic_flush: 0
2025/03/30-10:54:54.643374 8029035584 Options.avoid_unnecessary_blocking_io: 0
2025/03/30-10:54:54.643375 8029035584 Options.persist_stats_to_disk: 0
2025/03/30-10:54:54.643375 8029035584 Options.write_dbid_to_manifest: 0
2025/03/30-10:54:54.643376 8029035584 Options.log_readahead_size: 0
2025/03/30-10:54:54.643376 8029035584 Options.file_checksum_gen_factory: Unknown
2025/03/30-10:54:54.643377 8029035584 Options.best_efforts_recovery: 0
2025/03/30-10:54:54.643377 8029035584 Options.max_bgerror_resume_count: 2147483647
2025/03/30-10:54:54.643378 8029035584 Options.bgerror_resume_retry_interval: 1000000
2025/03/30-10:54:54.643379 8029035584 Options.allow_data_in_errors: 0
2025/03/30-10:54:54.643379 8029035584 Options.db_host_id: __hostname__
2025/03/30-10:54:54.643380 8029035584 Options.enforce_single_del_contracts: true
2025/03/30-10:54:54.643380 8029035584 Options.max_background_jobs: 12
2025/03/30-10:54:54.643381 8029035584 Options.max_background_compactions: -1
2025/03/30-10:54:54.643381 8029035584 Options.max_subcompactions: 1
2025/03/30-10:54:54.643382 8029035584 Options.avoid_flush_during_shutdown: 0
2025/03/30-10:54:54.643382 8029035584 Options.writable_file_max_buffer_size: 1048576
2025/03/30-10:54:54.643383 8029035584 Options.delayed_write_rate : 16777216
2025/03/30-10:54:54.643383 8029035584 Options.max_total_wal_size: 1073741824
2025/03/30-10:54:54.643384 8029035584 Options.delete_obsolete_files_period_micros: 21600000000
2025/03/30-10:54:54.643384 8029035584 Options.stats_dump_period_sec: 600
2025/03/30-10:54:54.643385 8029035584 Options.stats_persist_period_sec: 600
2025/03/30-10:54:54.643385 8029035584 Options.stats_history_buffer_size: 1048576
2025/03/30-10:54:54.643386 8029035584 Options.max_open_files: -1
2025/03/30-10:54:54.643386 8029035584 Options.bytes_per_sync: 0
2025/03/30-10:54:54.643387 8029035584 Options.wal_bytes_per_sync: 0
2025/03/30-10:54:54.643387 8029035584 Options.strict_bytes_per_sync: 0
2025/03/30-10:54:54.643388 8029035584 Options.compaction_readahead_size: 2097152
2025/03/30-10:54:54.643388 8029035584 Options.max_background_flushes: -1
2025/03/30-10:54:54.643389 8029035584 Compression algorithms supported:
2025/03/30-10:54:54.643389 8029035584 kZSTD supported: 0
2025/03/30-10:54:54.643390 8029035584 kZlibCompression supported: 0
2025/03/30-10:54:54.643390 8029035584 kXpressCompression supported: 0
2025/03/30-10:54:54.643391 8029035584 kSnappyCompression supported: 0
2025/03/30-10:54:54.643391 8029035584 kZSTDNotFinalCompression supported: 0
2025/03/30-10:54:54.643392 8029035584 kLZ4HCCompression supported: 0
2025/03/30-10:54:54.643392 8029035584 kLZ4Compression supported: 0
2025/03/30-10:54:54.643393 8029035584 kBZip2Compression supported: 0
2025/03/30-10:54:54.643396 8029035584 Fast CRC32 supported: Supported on Arm64
2025/03/30-10:54:54.643397 8029035584 DMutex implementation: pthread_mutex_t
2025/03/30-10:54:54.643477 8029035584 [db/version_set.cc:5858] Recovering from manifest file: /Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts/MANIFEST-000005
2025/03/30-10:54:54.643499 8029035584 [db/column_family.cc:617] --------------- Options for column family [default]:
2025/03/30-10:54:54.643500 8029035584 Options.comparator: leveldb.BytewiseComparator
2025/03/30-10:54:54.643501 8029035584 Options.merge_operator: None
2025/03/30-10:54:54.643501 8029035584 Options.compaction_filter: None
2025/03/30-10:54:54.643502 8029035584 Options.compaction_filter_factory: None
2025/03/30-10:54:54.643502 8029035584 Options.sst_partitioner_factory: None
2025/03/30-10:54:54.643503 8029035584 Options.memtable_factory: SkipListFactory
2025/03/30-10:54:54.643503 8029035584 Options.table_factory: BlockBasedTable
2025/03/30-10:54:54.643509 8029035584 table_factory options: flush_block_policy_factory: FlushBlockBySizePolicyFactory (0x600001192e60)
cache_index_and_filter_blocks: 1
cache_index_and_filter_blocks_with_high_priority: 1
pin_l0_filter_and_index_blocks_in_cache: 1
pin_top_level_index_and_filter: 1
index_type: 0
data_block_index_type: 0
index_shortening: 1
data_block_hash_table_util_ratio: 0.750000
checksum: 4
no_block_cache: 0
block_cache: 0x6000024a4198
block_cache_name: LRUCache
block_cache_options:
capacity : 67108864
num_shard_bits : 6
strict_capacity_limit : 0
memory_allocator : None
high_pri_pool_ratio: 0.500
low_pri_pool_ratio: 0.000
persistent_cache: 0x0
block_size: 16384
block_size_deviation: 10
block_restart_interval: 16
index_block_restart_interval: 1
metadata_block_size: 4096
partition_filters: 0
use_delta_encoding: 1
filter_policy: bloomfilter
whole_key_filtering: 1
verify_compression: 0
read_amp_bytes_per_bit: 0
format_version: 6
enable_index_compression: 1
block_align: 0
max_auto_readahead_size: 262144
prepopulate_block_cache: 0
initial_auto_readahead_size: 8192
num_file_reads_for_auto_readahead: 2
2025/03/30-10:54:54.643510 8029035584 Options.write_buffer_size: 67108864
2025/03/30-10:54:54.643510 8029035584 Options.max_write_buffer_number: 2
2025/03/30-10:54:54.643511 8029035584 Options.compression: NoCompression
2025/03/30-10:54:54.643511 8029035584 Options.bottommost_compression: Disabled
2025/03/30-10:54:54.643512 8029035584 Options.prefix_extractor: nullptr
2025/03/30-10:54:54.643512 8029035584 Options.memtable_insert_with_hint_prefix_extractor: nullptr
2025/03/30-10:54:54.643513 8029035584 Options.num_levels: 7
2025/03/30-10:54:54.643513 8029035584 Options.min_write_buffer_number_to_merge: 1
2025/03/30-10:54:54.643514 8029035584 Options.max_write_buffer_number_to_maintain: 0
2025/03/30-10:54:54.643514 8029035584 Options.max_write_buffer_size_to_maintain: 134217728
2025/03/30-10:54:54.643515 8029035584 Options.bottommost_compression_opts.window_bits: -14
2025/03/30-10:54:54.643515 8029035584 Options.bottommost_compression_opts.level: 32767
2025/03/30-10:54:54.643516 8029035584 Options.bottommost_compression_opts.strategy: 0
2025/03/30-10:54:54.643516 8029035584 Options.bottommost_compression_opts.max_dict_bytes: 0
2025/03/30-10:54:54.643517 8029035584 Options.bottommost_compression_opts.zstd_max_train_bytes: 0
2025/03/30-10:54:54.643517 8029035584 Options.bottommost_compression_opts.parallel_threads: 1
2025/03/30-10:54:54.643518 8029035584 Options.bottommost_compression_opts.enabled: false
2025/03/30-10:54:54.643518 8029035584 Options.bottommost_compression_opts.max_dict_buffer_bytes: 0
2025/03/30-10:54:54.643519 8029035584 Options.bottommost_compression_opts.use_zstd_dict_trainer: true
2025/03/30-10:54:54.643519 8029035584 Options.compression_opts.window_bits: -14
2025/03/30-10:54:54.643520 8029035584 Options.compression_opts.level: 32767
2025/03/30-10:54:54.643521 8029035584 Options.compression_opts.strategy: 0
2025/03/30-10:54:54.643521 8029035584 Options.compression_opts.max_dict_bytes: 0
2025/03/30-10:54:54.643521 8029035584 Options.compression_opts.zstd_max_train_bytes: 0
2025/03/30-10:54:54.643522 8029035584 Options.compression_opts.use_zstd_dict_trainer: true
2025/03/30-10:54:54.643523 8029035584 Options.compression_opts.parallel_threads: 1
2025/03/30-10:54:54.643523 8029035584 Options.compression_opts.enabled: false
2025/03/30-10:54:54.643524 8029035584 Options.compression_opts.max_dict_buffer_bytes: 0
2025/03/30-10:54:54.643524 8029035584 Options.level0_file_num_compaction_trigger: 4
2025/03/30-10:54:54.643525 8029035584 Options.level0_slowdown_writes_trigger: 20
2025/03/30-10:54:54.643525 8029035584 Options.level0_stop_writes_trigger: 36
2025/03/30-10:54:54.643525 8029035584 Options.target_file_size_base: 67108864
2025/03/30-10:54:54.643526 8029035584 Options.target_file_size_multiplier: 10
2025/03/30-10:54:54.643526 8029035584 Options.max_bytes_for_level_base: 268435456
2025/03/30-10:54:54.643527 8029035584 Options.level_compaction_dynamic_level_bytes: 1
2025/03/30-10:54:54.643527 8029035584 Options.max_bytes_for_level_multiplier: 10.000000
2025/03/30-10:54:54.643528 8029035584 Options.max_bytes_for_level_multiplier_addtl[0]: 1
2025/03/30-10:54:54.643529 8029035584 Options.max_bytes_for_level_multiplier_addtl[1]: 1
2025/03/30-10:54:54.643529 8029035584 Options.max_bytes_for_level_multiplier_addtl[2]: 1
2025/03/30-10:54:54.643530 8029035584 Options.max_bytes_for_level_multiplier_addtl[3]: 1
2025/03/30-10:54:54.643530 8029035584 Options.max_bytes_for_level_multiplier_addtl[4]: 1
2025/03/30-10:54:54.643531 8029035584 Options.max_bytes_for_level_multiplier_addtl[5]: 1
2025/03/30-10:54:54.643531 8029035584 Options.max_bytes_for_level_multiplier_addtl[6]: 1
2025/03/30-10:54:54.643532 8029035584 Options.max_sequential_skip_in_iterations: 8
2025/03/30-10:54:54.643532 8029035584 Options.max_compaction_bytes: 1677721600
2025/03/30-10:54:54.643533 8029035584 Options.ignore_max_compaction_bytes_for_input: true
2025/03/30-10:54:54.643533 8029035584 Options.arena_block_size: 1048576
2025/03/30-10:54:54.643534 8029035584 Options.soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-10:54:54.643534 8029035584 Options.hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-10:54:54.643535 8029035584 Options.disable_auto_compactions: 1
2025/03/30-10:54:54.643535 8029035584 Options.compaction_style: kCompactionStyleLevel
2025/03/30-10:54:54.643536 8029035584 Options.compaction_pri: kMinOverlappingRatio
2025/03/30-10:54:54.643536 8029035584 Options.compaction_options_universal.size_ratio: 1
2025/03/30-10:54:54.643537 8029035584 Options.compaction_options_universal.min_merge_width: 2
2025/03/30-10:54:54.643537 8029035584 Options.compaction_options_universal.max_merge_width: 4294967295
2025/03/30-10:54:54.643538 8029035584 Options.compaction_options_universal.max_size_amplification_percent: 200
2025/03/30-10:54:54.643538 8029035584 Options.compaction_options_universal.compression_size_percent: -1
2025/03/30-10:54:54.643539 8029035584 Options.compaction_options_universal.stop_style: kCompactionStopStyleTotalSize
2025/03/30-10:54:54.643539 8029035584 Options.compaction_options_fifo.max_table_files_size: 1073741824
2025/03/30-10:54:54.643540 8029035584 Options.compaction_options_fifo.allow_compaction: 0
2025/03/30-10:54:54.643541 8029035584 Options.table_properties_collectors:
2025/03/30-10:54:54.643541 8029035584 Options.inplace_update_support: 0
2025/03/30-10:54:54.643542 8029035584 Options.inplace_update_num_locks: 10000
2025/03/30-10:54:54.643542 8029035584 Options.memtable_prefix_bloom_size_ratio: 0.000000
2025/03/30-10:54:54.643543 8029035584 Options.memtable_whole_key_filtering: 0
2025/03/30-10:54:54.643543 8029035584 Options.memtable_huge_page_size: 0
2025/03/30-10:54:54.643544 8029035584 Options.bloom_locality: 0
2025/03/30-10:54:54.643544 8029035584 Options.max_successive_merges: 0
2025/03/30-10:54:54.643545 8029035584 Options.optimize_filters_for_hits: 0
2025/03/30-10:54:54.643545 8029035584 Options.paranoid_file_checks: 0
2025/03/30-10:54:54.643546 8029035584 Options.force_consistency_checks: 1
2025/03/30-10:54:54.643546 8029035584 Options.report_bg_io_stats: 0
2025/03/30-10:54:54.643547 8029035584 Options.ttl: 2592000
2025/03/30-10:54:54.643547 8029035584 Options.periodic_compaction_seconds: 0
2025/03/30-10:54:54.643548 8029035584 Options.preclude_last_level_data_seconds: 0
2025/03/30-10:54:54.643548 8029035584 Options.preserve_internal_time_seconds: 0
2025/03/30-10:54:54.643549 8029035584 Options.enable_blob_files: false
2025/03/30-10:54:54.643549 8029035584 Options.min_blob_size: 0
2025/03/30-10:54:54.643550 8029035584 Options.blob_file_size: 268435456
2025/03/30-10:54:54.643550 8029035584 Options.blob_compression_type: NoCompression
2025/03/30-10:54:54.643551 8029035584 Options.enable_blob_garbage_collection: false
2025/03/30-10:54:54.643551 8029035584 Options.blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-10:54:54.643552 8029035584 Options.blob_garbage_collection_force_threshold: 1.000000
2025/03/30-10:54:54.643552 8029035584 Options.blob_compaction_readahead_size: 0
2025/03/30-10:54:54.643553 8029035584 Options.blob_file_starting_level: 0
2025/03/30-10:54:54.643553 8029035584 Options.experimental_mempurge_threshold: 0.000000
2025/03/30-10:54:54.643554 8029035584 Options.memtable_max_range_deletions: 0
2025/03/30-10:54:54.643742 8029035584 [db/version_set.cc:5909] Recovered from manifest file:/Users/jacksonmorgan/O/nextgraph-rs/.ng/server/storage/accounts/MANIFEST-000005 succeeded,manifest_file_number is 5, next_file_number is 9, last_sequence is 0, log_number is 0,prev_log_number is 0,max_column_family is 0,min_log_number_to_keep is 0
2025/03/30-10:54:54.643744 8029035584 [db/version_set.cc:5918] Column family [default] (ID 0), log number is 0
2025/03/30-10:54:54.643777 8029035584 [db/db_impl/db_impl_open.cc:639] DB ID: 0e17eec6-49fd-4260-b9f6-242cf4d59760
2025/03/30-10:54:54.643848 8029035584 EVENT_LOG_v1 {"time_micros": 1743346494643845, "job": 1, "event": "recovery_started", "wal_files": [4]}
2025/03/30-10:54:54.643850 8029035584 [db/db_impl/db_impl_open.cc:1134] Recovering log #4 mode 2
2025/03/30-10:54:54.644234 8029035584 EVENT_LOG_v1 {"time_micros": 1743346494644222, "cf_name": "default", "job": 1, "event": "table_file_creation", "file_number": 10, "file_size": 1295, "file_checksum": "", "file_checksum_func_name": "Unknown", "smallest_seqno": 1, "largest_seqno": 1, "table_properties": {"data_size": 114, "index_size": 51, "index_partitions": 0, "top_level_index_size": 0, "index_key_is_user_key": 1, "index_value_is_delta_encoded": 1, "filter_size": 69, "raw_key_size": 42, "raw_average_key_size": 42, "raw_value_size": 56, "raw_average_value_size": 56, "num_data_blocks": 1, "num_entries": 1, "num_filter_entries": 1, "num_deletions": 0, "num_merge_operands": 0, "num_range_deletions": 0, "format_version": 0, "fixed_key_len": 0, "filter_policy": "bloomfilter", "column_family_name": "default", "column_family_id": 0, "comparator": "leveldb.BytewiseComparator", "merge_operator": "nullptr", "prefix_extractor_name": "nullptr", "property_collectors": "[]", "compression": "NoCompression", "compression_options": "window_bits=-14; level=32767; strategy=0; max_dict_bytes=0; zstd_max_train_bytes=0; enabled=0; max_dict_buffer_bytes=0; use_zstd_dict_trainer=1; ", "creation_time": 1743346494, "oldest_key_time": 0, "file_creation_time": 0, "slow_compression_estimated_data_size": 0, "fast_compression_estimated_data_size": 0, "db_id": "0e17eec6-49fd-4260-b9f6-242cf4d59760", "db_session_id": "KY92ZR8LCBK63UYA6SDG", "orig_file_number": 10, "seqno_to_time_mapping": "N/A"}}
2025/03/30-10:54:54.644309 8029035584 EVENT_LOG_v1 {"time_micros": 1743346494644308, "job": 1, "event": "recovery_finished"}
2025/03/30-10:54:54.644364 8029035584 [db/version_set.cc:5369] Creating manifest 12
2025/03/30-10:54:54.645173 8029035584 [db/db_impl/db_impl_open.cc:2121] SstFileManager instance 0x12e70d880
2025/03/30-10:54:54.645192 8029035584 DB pointer 0x139044c00
2025/03/30-10:54:54.645199 8029035584 [WARN] [utilities/transactions/pessimistic_transaction_db.cc:262] Transaction write_policy is 0
2025/03/30-10:54:54.645724 8029035584 [db/db_impl/db_impl.cc:1195] SetOptions() on column family [default], inputs:
2025/03/30-10:54:54.645725 8029035584 [db/db_impl/db_impl.cc:1198] disable_auto_compactions: false
2025/03/30-10:54:54.645726 8029035584 [db/db_impl/db_impl.cc:1202] [default] SetOptions() succeeded
2025/03/30-10:54:54.645726 8029035584 [options/cf_options.cc:1042] write_buffer_size: 67108864
2025/03/30-10:54:54.645727 8029035584 [options/cf_options.cc:1044] max_write_buffer_number: 2
2025/03/30-10:54:54.645727 8029035584 [options/cf_options.cc:1047] arena_block_size: 1048576
2025/03/30-10:54:54.645728 8029035584 [options/cf_options.cc:1049] memtable_prefix_bloom_ratio: 0.000000
2025/03/30-10:54:54.645728 8029035584 [options/cf_options.cc:1051] memtable_whole_key_filtering: 0
2025/03/30-10:54:54.645729 8029035584 [options/cf_options.cc:1054] memtable_huge_page_size: 0
2025/03/30-10:54:54.645730 8029035584 [options/cf_options.cc:1057] max_successive_merges: 0
2025/03/30-10:54:54.645730 8029035584 [options/cf_options.cc:1060] inplace_update_num_locks: 10000
2025/03/30-10:54:54.645731 8029035584 [options/cf_options.cc:1064] prefix_extractor: nullptr
2025/03/30-10:54:54.645731 8029035584 [options/cf_options.cc:1066] disable_auto_compactions: 0
2025/03/30-10:54:54.645732 8029035584 [options/cf_options.cc:1068] soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-10:54:54.645732 8029035584 [options/cf_options.cc:1070] hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-10:54:54.645733 8029035584 [options/cf_options.cc:1072] level0_file_num_compaction_trigger: 4
2025/03/30-10:54:54.645733 8029035584 [options/cf_options.cc:1074] level0_slowdown_writes_trigger: 20
2025/03/30-10:54:54.645734 8029035584 [options/cf_options.cc:1076] level0_stop_writes_trigger: 36
2025/03/30-10:54:54.645734 8029035584 [options/cf_options.cc:1078] max_compaction_bytes: 1677721600
2025/03/30-10:54:54.645735 8029035584 [options/cf_options.cc:1080] ignore_max_compaction_bytes_for_input: true
2025/03/30-10:54:54.645735 8029035584 [options/cf_options.cc:1082] target_file_size_base: 67108864
2025/03/30-10:54:54.645736 8029035584 [options/cf_options.cc:1084] target_file_size_multiplier: 10
2025/03/30-10:54:54.645736 8029035584 [options/cf_options.cc:1086] max_bytes_for_level_base: 268435456
2025/03/30-10:54:54.645737 8029035584 [options/cf_options.cc:1088] max_bytes_for_level_multiplier: 10.000000
2025/03/30-10:54:54.645738 8029035584 [options/cf_options.cc:1090] ttl: 2592000
2025/03/30-10:54:54.645738 8029035584 [options/cf_options.cc:1092] periodic_compaction_seconds: 0
2025/03/30-10:54:54.645739 8029035584 [options/cf_options.cc:1106] max_bytes_for_level_multiplier_additional: 1, 1, 1, 1, 1, 1, 1
2025/03/30-10:54:54.645740 8029035584 [options/cf_options.cc:1108] max_sequential_skip_in_iterations: 8
2025/03/30-10:54:54.645740 8029035584 [options/cf_options.cc:1110] check_flush_compaction_key_order: 1
2025/03/30-10:54:54.645741 8029035584 [options/cf_options.cc:1112] paranoid_file_checks: 0
2025/03/30-10:54:54.645741 8029035584 [options/cf_options.cc:1114] report_bg_io_stats: 0
2025/03/30-10:54:54.645742 8029035584 [options/cf_options.cc:1116] compression: 0
2025/03/30-10:54:54.645742 8029035584 [options/cf_options.cc:1119] experimental_mempurge_threshold: 0.000000
2025/03/30-10:54:54.645743 8029035584 [options/cf_options.cc:1123] compaction_options_universal.size_ratio : 1
2025/03/30-10:54:54.645744 8029035584 [options/cf_options.cc:1125] compaction_options_universal.min_merge_width : 2
2025/03/30-10:54:54.645744 8029035584 [options/cf_options.cc:1127] compaction_options_universal.max_merge_width : -1
2025/03/30-10:54:54.645745 8029035584 [options/cf_options.cc:1130] compaction_options_universal.max_size_amplification_percent : 200
2025/03/30-10:54:54.645745 8029035584 [options/cf_options.cc:1133] compaction_options_universal.compression_size_percent : -1
2025/03/30-10:54:54.645746 8029035584 [options/cf_options.cc:1135] compaction_options_universal.stop_style : 1
2025/03/30-10:54:54.645746 8029035584 [options/cf_options.cc:1138] compaction_options_universal.allow_trivial_move : 0
2025/03/30-10:54:54.645747 8029035584 [options/cf_options.cc:1140] compaction_options_universal.incremental : 0
2025/03/30-10:54:54.645747 8029035584 [options/cf_options.cc:1144] compaction_options_fifo.max_table_files_size : 1073741824
2025/03/30-10:54:54.645748 8029035584 [options/cf_options.cc:1146] compaction_options_fifo.allow_compaction : 0
2025/03/30-10:54:54.645748 8029035584 [options/cf_options.cc:1150] enable_blob_files: false
2025/03/30-10:54:54.645749 8029035584 [options/cf_options.cc:1152] min_blob_size: 0
2025/03/30-10:54:54.645749 8029035584 [options/cf_options.cc:1154] blob_file_size: 268435456
2025/03/30-10:54:54.645750 8029035584 [options/cf_options.cc:1156] blob_compression_type: NoCompression
2025/03/30-10:54:54.645750 8029035584 [options/cf_options.cc:1158] enable_blob_garbage_collection: false
2025/03/30-10:54:54.645751 8029035584 [options/cf_options.cc:1160] blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-10:54:54.645752 8029035584 [options/cf_options.cc:1162] blob_garbage_collection_force_threshold: 1.000000
2025/03/30-10:54:54.645752 8029035584 [options/cf_options.cc:1164] blob_compaction_readahead_size: 0
2025/03/30-10:54:54.645753 8029035584 [options/cf_options.cc:1166] blob_file_starting_level: 0
2025/03/30-10:54:54.645753 8029035584 [options/cf_options.cc:1170] prepopulate_blob_cache: disable
2025/03/30-10:54:54.645754 8029035584 [options/cf_options.cc:1172] last_level_temperature: 0
2025/03/30-10:55:00.650345 6142537728 [db/db_impl/db_impl.cc:1091] ------- DUMPING STATS -------
2025/03/30-10:55:00.650415 6142537728 [db/db_impl/db_impl.cc:1092]
** DB Stats **
Uptime(secs): 6.0 total, 6.0 interval
Cumulative writes: 0 writes, 0 keys, 0 commit groups, 0.0 writes per commit group, ingest: 0.00 GB, 0.00 MB/s
Cumulative WAL: 0 writes, 0 syncs, 0.00 writes per sync, written: 0.00 GB, 0.00 MB/s
Cumulative stall: 00:00:0.000 H:M:S, 0.0 percent
Interval writes: 0 writes, 0 keys, 0 commit groups, 0.0 writes per commit group, ingest: 0.00 MB, 0.00 MB/s
Interval WAL: 0 writes, 0 syncs, 0.00 writes per sync, written: 0.00 GB, 0.00 MB/s
Interval stall: 00:00:0.000 H:M:S, 0.0 percent
Write Stall (count): write-buffer-manager-limit-stops: 0
** Compaction Stats [default] **
Level Files Size Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
L0 1/0 1.26 KB 0.2 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 3.3 0.00 0.00 1 0.000 0 0 0.0 0.0
Sum 1/0 1.26 KB 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 3.3 0.00 0.00 1 0.000 0 0 0.0 0.0
Int 0/0 0.00 KB 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 3.3 0.00 0.00 1 0.000 0 0 0.0 0.0
** Compaction Stats [default] **
Priority Files Size Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
User 0/0 0.00 KB 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3 0.00 0.00 1 0.000 0 0 0.0 0.0
Blob file count: 0, total size: 0.0 GB, garbage size: 0.0 GB, space amp: 0.0
Uptime(secs): 6.0 total, 6.0 interval
Flush(GB): cumulative 0.000, interval 0.000
AddFile(GB): cumulative 0.000, interval 0.000
AddFile(Total Files): cumulative 0, interval 0
AddFile(L0 Files): cumulative 0, interval 0
AddFile(Keys): cumulative 0, interval 0
Cumulative compaction: 0.00 GB write, 0.00 MB/s write, 0.00 GB read, 0.00 MB/s read, 0.0 seconds
Interval compaction: 0.00 GB write, 0.00 MB/s write, 0.00 GB read, 0.00 MB/s read, 0.0 seconds
Write Stall (count): cf-l0-file-count-limit-delays-with-ongoing-compaction: 0, cf-l0-file-count-limit-stops-with-ongoing-compaction: 0, l0-file-count-limit-delays: 0, l0-file-count-limit-stops: 0, memtable-limit-delays: 0, memtable-limit-stops: 0, pending-compaction-bytes-delays: 0, pending-compaction-bytes-stops: 0, total-delays: 0, total-stops: 0
Block cache LRUCache@0x6000024a4198#97224 capacity: 64.00 MB seed: 152519891 usage: 0.48 KB table_size: 1024 occupancy: 3 collections: 1 last_copies: 0 last_secs: 4.4e-05 secs_since: 0
Block cache entry stats(count,size,portion): FilterBlock(1,0.10 KB,0.000150502%) IndexBlock(1,0.13 KB,0.000199676%) Misc(1,0.00 KB,0%)
** File Read Latency Histogram By Level [default] **

@ -1,305 +0,0 @@
2025/03/30-11:04:18.135145 8029035584 RocksDB version: 8.6.0
2025/03/30-11:04:18.135177 8029035584 Compile date 2023-06-15 05:32:14
2025/03/30-11:04:18.135178 8029035584 DB SUMMARY
2025/03/30-11:04:18.135179 8029035584 DB Session ID: 7MUCSF891X500MQRN1NG
2025/03/30-11:04:18.135210 8029035584 CURRENT file: CURRENT
2025/03/30-11:04:18.135211 8029035584 IDENTITY file: IDENTITY
2025/03/30-11:04:18.135215 8029035584 MANIFEST file: MANIFEST-000012 size: 251 Bytes
2025/03/30-11:04:18.135216 8029035584 SST files in /Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts dir, Total Num: 1, files: 000010.sst
2025/03/30-11:04:18.135217 8029035584 Write Ahead Log file in /Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts: 000004.log size: 113 ; 000011.log size: 114 ;
2025/03/30-11:04:18.135219 8029035584 Options.error_if_exists: 0
2025/03/30-11:04:18.135220 8029035584 Options.create_if_missing: 1
2025/03/30-11:04:18.135220 8029035584 Options.paranoid_checks: 1
2025/03/30-11:04:18.135221 8029035584 Options.flush_verify_memtable_count: 1
2025/03/30-11:04:18.135222 8029035584 Options.compaction_verify_record_count: 1
2025/03/30-11:04:18.135222 8029035584 Options.track_and_verify_wals_in_manifest: 0
2025/03/30-11:04:18.135223 8029035584 Options.verify_sst_unique_id_in_manifest: 1
2025/03/30-11:04:18.135224 8029035584 Options.env: 0x600003b9c720
2025/03/30-11:04:18.135225 8029035584 Options.fs: EncryptedFileSystem
2025/03/30-11:04:18.135226 8029035584 Options.info_log: 0x12d3075a8
2025/03/30-11:04:18.135226 8029035584 Options.max_file_opening_threads: 16
2025/03/30-11:04:18.135227 8029035584 Options.statistics: 0x0
2025/03/30-11:04:18.135228 8029035584 Options.use_fsync: 0
2025/03/30-11:04:18.135229 8029035584 Options.max_log_file_size: 0
2025/03/30-11:04:18.135229 8029035584 Options.max_manifest_file_size: 1073741824
2025/03/30-11:04:18.135230 8029035584 Options.log_file_time_to_roll: 0
2025/03/30-11:04:18.135231 8029035584 Options.keep_log_file_num: 1000
2025/03/30-11:04:18.135232 8029035584 Options.recycle_log_file_num: 0
2025/03/30-11:04:18.135232 8029035584 Options.allow_fallocate: 1
2025/03/30-11:04:18.135233 8029035584 Options.allow_mmap_reads: 0
2025/03/30-11:04:18.135234 8029035584 Options.allow_mmap_writes: 0
2025/03/30-11:04:18.135235 8029035584 Options.use_direct_reads: 0
2025/03/30-11:04:18.135235 8029035584 Options.use_direct_io_for_flush_and_compaction: 0
2025/03/30-11:04:18.135236 8029035584 Options.create_missing_column_families: 1
2025/03/30-11:04:18.135237 8029035584 Options.db_log_dir:
2025/03/30-11:04:18.135237 8029035584 Options.wal_dir:
2025/03/30-11:04:18.135238 8029035584 Options.table_cache_numshardbits: 6
2025/03/30-11:04:18.135239 8029035584 Options.WAL_ttl_seconds: 0
2025/03/30-11:04:18.135240 8029035584 Options.WAL_size_limit_MB: 0
2025/03/30-11:04:18.135240 8029035584 Options.max_write_batch_group_size_bytes: 1048576
2025/03/30-11:04:18.135241 8029035584 Options.manifest_preallocation_size: 4194304
2025/03/30-11:04:18.135242 8029035584 Options.is_fd_close_on_exec: 1
2025/03/30-11:04:18.135243 8029035584 Options.advise_random_on_open: 1
2025/03/30-11:04:18.135243 8029035584 Options.db_write_buffer_size: 67108864
2025/03/30-11:04:18.135244 8029035584 Options.write_buffer_manager: 0x60000249c680
2025/03/30-11:04:18.135245 8029035584 Options.access_hint_on_compaction_start: 1
2025/03/30-11:04:18.135245 8029035584 Options.random_access_max_buffer_size: 1048576
2025/03/30-11:04:18.135246 8029035584 Options.use_adaptive_mutex: 0
2025/03/30-11:04:18.135247 8029035584 Options.rate_limiter: 0x0
2025/03/30-11:04:18.135248 8029035584 Options.sst_file_manager.rate_bytes_per_sec: 0
2025/03/30-11:04:18.135248 8029035584 Options.wal_recovery_mode: 2
2025/03/30-11:04:18.135249 8029035584 Options.enable_thread_tracking: 0
2025/03/30-11:04:18.135250 8029035584 Options.enable_pipelined_write: 0
2025/03/30-11:04:18.135251 8029035584 Options.unordered_write: 0
2025/03/30-11:04:18.135251 8029035584 Options.allow_concurrent_memtable_write: 1
2025/03/30-11:04:18.135252 8029035584 Options.enable_write_thread_adaptive_yield: 1
2025/03/30-11:04:18.135253 8029035584 Options.write_thread_max_yield_usec: 100
2025/03/30-11:04:18.135254 8029035584 Options.write_thread_slow_yield_usec: 3
2025/03/30-11:04:18.135254 8029035584 Options.row_cache: None
2025/03/30-11:04:18.135255 8029035584 Options.wal_filter: None
2025/03/30-11:04:18.135256 8029035584 Options.avoid_flush_during_recovery: 0
2025/03/30-11:04:18.135257 8029035584 Options.allow_ingest_behind: 0
2025/03/30-11:04:18.135257 8029035584 Options.two_write_queues: 0
2025/03/30-11:04:18.135258 8029035584 Options.manual_wal_flush: 0
2025/03/30-11:04:18.135259 8029035584 Options.wal_compression: 0
2025/03/30-11:04:18.135260 8029035584 Options.atomic_flush: 0
2025/03/30-11:04:18.135260 8029035584 Options.avoid_unnecessary_blocking_io: 0
2025/03/30-11:04:18.135261 8029035584 Options.persist_stats_to_disk: 0
2025/03/30-11:04:18.135262 8029035584 Options.write_dbid_to_manifest: 0
2025/03/30-11:04:18.135263 8029035584 Options.log_readahead_size: 0
2025/03/30-11:04:18.135263 8029035584 Options.file_checksum_gen_factory: Unknown
2025/03/30-11:04:18.135264 8029035584 Options.best_efforts_recovery: 0
2025/03/30-11:04:18.135265 8029035584 Options.max_bgerror_resume_count: 2147483647
2025/03/30-11:04:18.135266 8029035584 Options.bgerror_resume_retry_interval: 1000000
2025/03/30-11:04:18.135266 8029035584 Options.allow_data_in_errors: 0
2025/03/30-11:04:18.135267 8029035584 Options.db_host_id: __hostname__
2025/03/30-11:04:18.135268 8029035584 Options.enforce_single_del_contracts: true
2025/03/30-11:04:18.135269 8029035584 Options.max_background_jobs: 12
2025/03/30-11:04:18.135269 8029035584 Options.max_background_compactions: -1
2025/03/30-11:04:18.135270 8029035584 Options.max_subcompactions: 1
2025/03/30-11:04:18.135271 8029035584 Options.avoid_flush_during_shutdown: 0
2025/03/30-11:04:18.135272 8029035584 Options.writable_file_max_buffer_size: 1048576
2025/03/30-11:04:18.135272 8029035584 Options.delayed_write_rate : 16777216
2025/03/30-11:04:18.135273 8029035584 Options.max_total_wal_size: 1073741824
2025/03/30-11:04:18.135274 8029035584 Options.delete_obsolete_files_period_micros: 21600000000
2025/03/30-11:04:18.135275 8029035584 Options.stats_dump_period_sec: 600
2025/03/30-11:04:18.135276 8029035584 Options.stats_persist_period_sec: 600
2025/03/30-11:04:18.135276 8029035584 Options.stats_history_buffer_size: 1048576
2025/03/30-11:04:18.135277 8029035584 Options.max_open_files: -1
2025/03/30-11:04:18.135278 8029035584 Options.bytes_per_sync: 0
2025/03/30-11:04:18.135279 8029035584 Options.wal_bytes_per_sync: 0
2025/03/30-11:04:18.135279 8029035584 Options.strict_bytes_per_sync: 0
2025/03/30-11:04:18.135280 8029035584 Options.compaction_readahead_size: 2097152
2025/03/30-11:04:18.135281 8029035584 Options.max_background_flushes: -1
2025/03/30-11:04:18.135282 8029035584 Compression algorithms supported:
2025/03/30-11:04:18.135282 8029035584 kZSTD supported: 0
2025/03/30-11:04:18.135283 8029035584 kZlibCompression supported: 0
2025/03/30-11:04:18.135284 8029035584 kXpressCompression supported: 0
2025/03/30-11:04:18.135285 8029035584 kSnappyCompression supported: 0
2025/03/30-11:04:18.135286 8029035584 kZSTDNotFinalCompression supported: 0
2025/03/30-11:04:18.135286 8029035584 kLZ4HCCompression supported: 0
2025/03/30-11:04:18.135287 8029035584 kLZ4Compression supported: 0
2025/03/30-11:04:18.135288 8029035584 kBZip2Compression supported: 0
2025/03/30-11:04:18.135292 8029035584 Fast CRC32 supported: Supported on Arm64
2025/03/30-11:04:18.135293 8029035584 DMutex implementation: pthread_mutex_t
2025/03/30-11:04:18.135536 8029035584 [db/version_set.cc:5858] Recovering from manifest file: /Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts/MANIFEST-000012
2025/03/30-11:04:18.135734 8029035584 [db/column_family.cc:617] --------------- Options for column family [default]:
2025/03/30-11:04:18.135735 8029035584 Options.comparator: leveldb.BytewiseComparator
2025/03/30-11:04:18.135735 8029035584 Options.merge_operator: None
2025/03/30-11:04:18.135736 8029035584 Options.compaction_filter: None
2025/03/30-11:04:18.135736 8029035584 Options.compaction_filter_factory: None
2025/03/30-11:04:18.135737 8029035584 Options.sst_partitioner_factory: None
2025/03/30-11:04:18.135737 8029035584 Options.memtable_factory: SkipListFactory
2025/03/30-11:04:18.135738 8029035584 Options.table_factory: BlockBasedTable
2025/03/30-11:04:18.135745 8029035584 table_factory options: flush_block_policy_factory: FlushBlockBySizePolicyFactory (0x600001fccce0)
cache_index_and_filter_blocks: 1
cache_index_and_filter_blocks_with_high_priority: 1
pin_l0_filter_and_index_blocks_in_cache: 1
pin_top_level_index_and_filter: 1
index_type: 0
data_block_index_type: 0
index_shortening: 1
data_block_hash_table_util_ratio: 0.750000
checksum: 4
no_block_cache: 0
block_cache: 0x600002a98858
block_cache_name: LRUCache
block_cache_options:
capacity : 67108864
num_shard_bits : 6
strict_capacity_limit : 0
memory_allocator : None
high_pri_pool_ratio: 0.500
low_pri_pool_ratio: 0.000
persistent_cache: 0x0
block_size: 16384
block_size_deviation: 10
block_restart_interval: 16
index_block_restart_interval: 1
metadata_block_size: 4096
partition_filters: 0
use_delta_encoding: 1
filter_policy: bloomfilter
whole_key_filtering: 1
verify_compression: 0
read_amp_bytes_per_bit: 0
format_version: 6
enable_index_compression: 1
block_align: 0
max_auto_readahead_size: 262144
prepopulate_block_cache: 0
initial_auto_readahead_size: 8192
num_file_reads_for_auto_readahead: 2
2025/03/30-11:04:18.135746 8029035584 Options.write_buffer_size: 67108864
2025/03/30-11:04:18.135746 8029035584 Options.max_write_buffer_number: 2
2025/03/30-11:04:18.135747 8029035584 Options.compression: NoCompression
2025/03/30-11:04:18.135747 8029035584 Options.bottommost_compression: Disabled
2025/03/30-11:04:18.135748 8029035584 Options.prefix_extractor: nullptr
2025/03/30-11:04:18.135748 8029035584 Options.memtable_insert_with_hint_prefix_extractor: nullptr
2025/03/30-11:04:18.135749 8029035584 Options.num_levels: 7
2025/03/30-11:04:18.135749 8029035584 Options.min_write_buffer_number_to_merge: 1
2025/03/30-11:04:18.135750 8029035584 Options.max_write_buffer_number_to_maintain: 0
2025/03/30-11:04:18.135750 8029035584 Options.max_write_buffer_size_to_maintain: 134217728
2025/03/30-11:04:18.135751 8029035584 Options.bottommost_compression_opts.window_bits: -14
2025/03/30-11:04:18.135751 8029035584 Options.bottommost_compression_opts.level: 32767
2025/03/30-11:04:18.135752 8029035584 Options.bottommost_compression_opts.strategy: 0
2025/03/30-11:04:18.135752 8029035584 Options.bottommost_compression_opts.max_dict_bytes: 0
2025/03/30-11:04:18.135753 8029035584 Options.bottommost_compression_opts.zstd_max_train_bytes: 0
2025/03/30-11:04:18.135753 8029035584 Options.bottommost_compression_opts.parallel_threads: 1
2025/03/30-11:04:18.135754 8029035584 Options.bottommost_compression_opts.enabled: false
2025/03/30-11:04:18.135754 8029035584 Options.bottommost_compression_opts.max_dict_buffer_bytes: 0
2025/03/30-11:04:18.135755 8029035584 Options.bottommost_compression_opts.use_zstd_dict_trainer: true
2025/03/30-11:04:18.135755 8029035584 Options.compression_opts.window_bits: -14
2025/03/30-11:04:18.135756 8029035584 Options.compression_opts.level: 32767
2025/03/30-11:04:18.135756 8029035584 Options.compression_opts.strategy: 0
2025/03/30-11:04:18.135757 8029035584 Options.compression_opts.max_dict_bytes: 0
2025/03/30-11:04:18.135757 8029035584 Options.compression_opts.zstd_max_train_bytes: 0
2025/03/30-11:04:18.135758 8029035584 Options.compression_opts.use_zstd_dict_trainer: true
2025/03/30-11:04:18.135758 8029035584 Options.compression_opts.parallel_threads: 1
2025/03/30-11:04:18.135759 8029035584 Options.compression_opts.enabled: false
2025/03/30-11:04:18.135759 8029035584 Options.compression_opts.max_dict_buffer_bytes: 0
2025/03/30-11:04:18.135760 8029035584 Options.level0_file_num_compaction_trigger: 4
2025/03/30-11:04:18.135760 8029035584 Options.level0_slowdown_writes_trigger: 20
2025/03/30-11:04:18.135761 8029035584 Options.level0_stop_writes_trigger: 36
2025/03/30-11:04:18.135761 8029035584 Options.target_file_size_base: 67108864
2025/03/30-11:04:18.135761 8029035584 Options.target_file_size_multiplier: 10
2025/03/30-11:04:18.135762 8029035584 Options.max_bytes_for_level_base: 268435456
2025/03/30-11:04:18.135762 8029035584 Options.level_compaction_dynamic_level_bytes: 1
2025/03/30-11:04:18.135763 8029035584 Options.max_bytes_for_level_multiplier: 10.000000
2025/03/30-11:04:18.135763 8029035584 Options.max_bytes_for_level_multiplier_addtl[0]: 1
2025/03/30-11:04:18.135764 8029035584 Options.max_bytes_for_level_multiplier_addtl[1]: 1
2025/03/30-11:04:18.135764 8029035584 Options.max_bytes_for_level_multiplier_addtl[2]: 1
2025/03/30-11:04:18.135765 8029035584 Options.max_bytes_for_level_multiplier_addtl[3]: 1
2025/03/30-11:04:18.135765 8029035584 Options.max_bytes_for_level_multiplier_addtl[4]: 1
2025/03/30-11:04:18.135766 8029035584 Options.max_bytes_for_level_multiplier_addtl[5]: 1
2025/03/30-11:04:18.135766 8029035584 Options.max_bytes_for_level_multiplier_addtl[6]: 1
2025/03/30-11:04:18.135767 8029035584 Options.max_sequential_skip_in_iterations: 8
2025/03/30-11:04:18.135767 8029035584 Options.max_compaction_bytes: 1677721600
2025/03/30-11:04:18.135768 8029035584 Options.ignore_max_compaction_bytes_for_input: true
2025/03/30-11:04:18.135768 8029035584 Options.arena_block_size: 1048576
2025/03/30-11:04:18.135769 8029035584 Options.soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-11:04:18.135769 8029035584 Options.hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-11:04:18.135770 8029035584 Options.disable_auto_compactions: 1
2025/03/30-11:04:18.135770 8029035584 Options.compaction_style: kCompactionStyleLevel
2025/03/30-11:04:18.135771 8029035584 Options.compaction_pri: kMinOverlappingRatio
2025/03/30-11:04:18.135771 8029035584 Options.compaction_options_universal.size_ratio: 1
2025/03/30-11:04:18.135772 8029035584 Options.compaction_options_universal.min_merge_width: 2
2025/03/30-11:04:18.135773 8029035584 Options.compaction_options_universal.max_merge_width: 4294967295
2025/03/30-11:04:18.135774 8029035584 Options.compaction_options_universal.max_size_amplification_percent: 200
2025/03/30-11:04:18.135774 8029035584 Options.compaction_options_universal.compression_size_percent: -1
2025/03/30-11:04:18.135775 8029035584 Options.compaction_options_universal.stop_style: kCompactionStopStyleTotalSize
2025/03/30-11:04:18.135776 8029035584 Options.compaction_options_fifo.max_table_files_size: 1073741824
2025/03/30-11:04:18.135776 8029035584 Options.compaction_options_fifo.allow_compaction: 0
2025/03/30-11:04:18.135777 8029035584 Options.table_properties_collectors:
2025/03/30-11:04:18.135777 8029035584 Options.inplace_update_support: 0
2025/03/30-11:04:18.135778 8029035584 Options.inplace_update_num_locks: 10000
2025/03/30-11:04:18.135778 8029035584 Options.memtable_prefix_bloom_size_ratio: 0.000000
2025/03/30-11:04:18.135779 8029035584 Options.memtable_whole_key_filtering: 0
2025/03/30-11:04:18.135779 8029035584 Options.memtable_huge_page_size: 0
2025/03/30-11:04:18.135780 8029035584 Options.bloom_locality: 0
2025/03/30-11:04:18.135780 8029035584 Options.max_successive_merges: 0
2025/03/30-11:04:18.135781 8029035584 Options.optimize_filters_for_hits: 0
2025/03/30-11:04:18.135781 8029035584 Options.paranoid_file_checks: 0
2025/03/30-11:04:18.135781 8029035584 Options.force_consistency_checks: 1
2025/03/30-11:04:18.135782 8029035584 Options.report_bg_io_stats: 0
2025/03/30-11:04:18.135782 8029035584 Options.ttl: 2592000
2025/03/30-11:04:18.135783 8029035584 Options.periodic_compaction_seconds: 0
2025/03/30-11:04:18.135783 8029035584 Options.preclude_last_level_data_seconds: 0
2025/03/30-11:04:18.135784 8029035584 Options.preserve_internal_time_seconds: 0
2025/03/30-11:04:18.135784 8029035584 Options.enable_blob_files: false
2025/03/30-11:04:18.135785 8029035584 Options.min_blob_size: 0
2025/03/30-11:04:18.135785 8029035584 Options.blob_file_size: 268435456
2025/03/30-11:04:18.135786 8029035584 Options.blob_compression_type: NoCompression
2025/03/30-11:04:18.135786 8029035584 Options.enable_blob_garbage_collection: false
2025/03/30-11:04:18.135787 8029035584 Options.blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-11:04:18.135787 8029035584 Options.blob_garbage_collection_force_threshold: 1.000000
2025/03/30-11:04:18.135788 8029035584 Options.blob_compaction_readahead_size: 0
2025/03/30-11:04:18.135788 8029035584 Options.blob_file_starting_level: 0
2025/03/30-11:04:18.135789 8029035584 Options.experimental_mempurge_threshold: 0.000000
2025/03/30-11:04:18.135789 8029035584 Options.memtable_max_range_deletions: 0
2025/03/30-11:04:18.136002 8029035584 [db/version_set.cc:5909] Recovered from manifest file:/Users/jacksonmorgan/O/ldo/packages/connected-nextgraph/./test/nextgraph-data/server/storage/accounts/MANIFEST-000012 succeeded,manifest_file_number is 12, next_file_number is 16, last_sequence is 1, log_number is 5,prev_log_number is 0,max_column_family is 0,min_log_number_to_keep is 0
2025/03/30-11:04:18.136004 8029035584 [db/version_set.cc:5918] Column family [default] (ID 0), log number is 5
2025/03/30-11:04:18.136069 8029035584 [db/db_impl/db_impl_open.cc:639] DB ID: 0e17eec6-49fd-4260-b9f6-242cf4d59760
2025/03/30-11:04:18.136146 8029035584 EVENT_LOG_v1 {"time_micros": 1743347058136144, "job": 1, "event": "recovery_started", "wal_files": [4, 11]}
2025/03/30-11:04:18.136148 8029035584 [db/db_impl/db_impl_open.cc:1134] Recovering log #4 mode 2
2025/03/30-11:04:18.136309 8029035584 [db/db_impl/db_impl_open.cc:1134] Recovering log #11 mode 2
2025/03/30-11:04:18.136749 8029035584 EVENT_LOG_v1 {"time_micros": 1743347058136738, "cf_name": "default", "job": 1, "event": "table_file_creation", "file_number": 17, "file_size": 1285, "file_checksum": "", "file_checksum_func_name": "Unknown", "smallest_seqno": 2, "largest_seqno": 3, "table_properties": {"data_size": 104, "index_size": 51, "index_partitions": 0, "top_level_index_size": 0, "index_key_is_user_key": 1, "index_value_is_delta_encoded": 1, "filter_size": 69, "raw_key_size": 84, "raw_average_key_size": 42, "raw_value_size": 1, "raw_average_value_size": 0, "num_data_blocks": 1, "num_entries": 2, "num_filter_entries": 2, "num_deletions": 1, "num_merge_operands": 0, "num_range_deletions": 0, "format_version": 0, "fixed_key_len": 0, "filter_policy": "bloomfilter", "column_family_name": "default", "column_family_id": 0, "comparator": "leveldb.BytewiseComparator", "merge_operator": "nullptr", "prefix_extractor_name": "nullptr", "property_collectors": "[]", "compression": "NoCompression", "compression_options": "window_bits=-14; level=32767; strategy=0; max_dict_bytes=0; zstd_max_train_bytes=0; enabled=0; max_dict_buffer_bytes=0; use_zstd_dict_trainer=1; ", "creation_time": 1743347058, "oldest_key_time": 0, "file_creation_time": 0, "slow_compression_estimated_data_size": 0, "fast_compression_estimated_data_size": 0, "db_id": "0e17eec6-49fd-4260-b9f6-242cf4d59760", "db_session_id": "7MUCSF891X500MQRN1NG", "orig_file_number": 17, "seqno_to_time_mapping": "N/A"}}
2025/03/30-11:04:18.136815 8029035584 EVENT_LOG_v1 {"time_micros": 1743347058136814, "job": 1, "event": "recovery_finished"}
2025/03/30-11:04:18.136870 8029035584 [db/version_set.cc:5369] Creating manifest 19
2025/03/30-11:04:18.137963 8029035584 [db/db_impl/db_impl_open.cc:2121] SstFileManager instance 0x12d309720
2025/03/30-11:04:18.137992 8029035584 DB pointer 0x12f035600
2025/03/30-11:04:18.138005 8029035584 [WARN] [utilities/transactions/pessimistic_transaction_db.cc:262] Transaction write_policy is 0
2025/03/30-11:04:18.138851 8029035584 [db/db_impl/db_impl.cc:1195] SetOptions() on column family [default], inputs:
2025/03/30-11:04:18.138853 8029035584 [db/db_impl/db_impl.cc:1198] disable_auto_compactions: false
2025/03/30-11:04:18.138854 8029035584 [db/db_impl/db_impl.cc:1202] [default] SetOptions() succeeded
2025/03/30-11:04:18.138854 8029035584 [options/cf_options.cc:1042] write_buffer_size: 67108864
2025/03/30-11:04:18.138855 8029035584 [options/cf_options.cc:1044] max_write_buffer_number: 2
2025/03/30-11:04:18.138856 8029035584 [options/cf_options.cc:1047] arena_block_size: 1048576
2025/03/30-11:04:18.138857 8029035584 [options/cf_options.cc:1049] memtable_prefix_bloom_ratio: 0.000000
2025/03/30-11:04:18.138858 8029035584 [options/cf_options.cc:1051] memtable_whole_key_filtering: 0
2025/03/30-11:04:18.138858 8029035584 [options/cf_options.cc:1054] memtable_huge_page_size: 0
2025/03/30-11:04:18.138859 8029035584 [options/cf_options.cc:1057] max_successive_merges: 0
2025/03/30-11:04:18.138860 8029035584 [options/cf_options.cc:1060] inplace_update_num_locks: 10000
2025/03/30-11:04:18.138861 8029035584 [options/cf_options.cc:1064] prefix_extractor: nullptr
2025/03/30-11:04:18.138861 8029035584 [options/cf_options.cc:1066] disable_auto_compactions: 0
2025/03/30-11:04:18.138862 8029035584 [options/cf_options.cc:1068] soft_pending_compaction_bytes_limit: 68719476736
2025/03/30-11:04:18.138863 8029035584 [options/cf_options.cc:1070] hard_pending_compaction_bytes_limit: 274877906944
2025/03/30-11:04:18.138864 8029035584 [options/cf_options.cc:1072] level0_file_num_compaction_trigger: 4
2025/03/30-11:04:18.138864 8029035584 [options/cf_options.cc:1074] level0_slowdown_writes_trigger: 20
2025/03/30-11:04:18.138865 8029035584 [options/cf_options.cc:1076] level0_stop_writes_trigger: 36
2025/03/30-11:04:18.138866 8029035584 [options/cf_options.cc:1078] max_compaction_bytes: 1677721600
2025/03/30-11:04:18.138866 8029035584 [options/cf_options.cc:1080] ignore_max_compaction_bytes_for_input: true
2025/03/30-11:04:18.138867 8029035584 [options/cf_options.cc:1082] target_file_size_base: 67108864
2025/03/30-11:04:18.138868 8029035584 [options/cf_options.cc:1084] target_file_size_multiplier: 10
2025/03/30-11:04:18.138869 8029035584 [options/cf_options.cc:1086] max_bytes_for_level_base: 268435456
2025/03/30-11:04:18.138869 8029035584 [options/cf_options.cc:1088] max_bytes_for_level_multiplier: 10.000000
2025/03/30-11:04:18.138870 8029035584 [options/cf_options.cc:1090] ttl: 2592000
2025/03/30-11:04:18.138871 8029035584 [options/cf_options.cc:1092] periodic_compaction_seconds: 0
2025/03/30-11:04:18.138872 8029035584 [options/cf_options.cc:1106] max_bytes_for_level_multiplier_additional: 1, 1, 1, 1, 1, 1, 1
2025/03/30-11:04:18.138873 8029035584 [options/cf_options.cc:1108] max_sequential_skip_in_iterations: 8
2025/03/30-11:04:18.138874 8029035584 [options/cf_options.cc:1110] check_flush_compaction_key_order: 1
2025/03/30-11:04:18.138875 8029035584 [options/cf_options.cc:1112] paranoid_file_checks: 0
2025/03/30-11:04:18.138875 8029035584 [options/cf_options.cc:1114] report_bg_io_stats: 0
2025/03/30-11:04:18.138876 8029035584 [options/cf_options.cc:1116] compression: 0
2025/03/30-11:04:18.138877 8029035584 [options/cf_options.cc:1119] experimental_mempurge_threshold: 0.000000
2025/03/30-11:04:18.138878 8029035584 [options/cf_options.cc:1123] compaction_options_universal.size_ratio : 1
2025/03/30-11:04:18.138878 8029035584 [options/cf_options.cc:1125] compaction_options_universal.min_merge_width : 2
2025/03/30-11:04:18.138879 8029035584 [options/cf_options.cc:1127] compaction_options_universal.max_merge_width : -1
2025/03/30-11:04:18.138880 8029035584 [options/cf_options.cc:1130] compaction_options_universal.max_size_amplification_percent : 200
2025/03/30-11:04:18.138880 8029035584 [options/cf_options.cc:1133] compaction_options_universal.compression_size_percent : -1
2025/03/30-11:04:18.138881 8029035584 [options/cf_options.cc:1135] compaction_options_universal.stop_style : 1
2025/03/30-11:04:18.138882 8029035584 [options/cf_options.cc:1138] compaction_options_universal.allow_trivial_move : 0
2025/03/30-11:04:18.138883 8029035584 [options/cf_options.cc:1140] compaction_options_universal.incremental : 0
2025/03/30-11:04:18.138883 8029035584 [options/cf_options.cc:1144] compaction_options_fifo.max_table_files_size : 1073741824
2025/03/30-11:04:18.138884 8029035584 [options/cf_options.cc:1146] compaction_options_fifo.allow_compaction : 0
2025/03/30-11:04:18.138885 8029035584 [options/cf_options.cc:1150] enable_blob_files: false
2025/03/30-11:04:18.138886 8029035584 [options/cf_options.cc:1152] min_blob_size: 0
2025/03/30-11:04:18.138886 8029035584 [options/cf_options.cc:1154] blob_file_size: 268435456
2025/03/30-11:04:18.138887 8029035584 [options/cf_options.cc:1156] blob_compression_type: NoCompression
2025/03/30-11:04:18.138888 8029035584 [options/cf_options.cc:1158] enable_blob_garbage_collection: false
2025/03/30-11:04:18.138888 8029035584 [options/cf_options.cc:1160] blob_garbage_collection_age_cutoff: 0.250000
2025/03/30-11:04:18.138889 8029035584 [options/cf_options.cc:1162] blob_garbage_collection_force_threshold: 1.000000
2025/03/30-11:04:18.138890 8029035584 [options/cf_options.cc:1164] blob_compaction_readahead_size: 0
2025/03/30-11:04:18.138891 8029035584 [options/cf_options.cc:1166] blob_file_starting_level: 0
2025/03/30-11:04:18.138891 8029035584 [options/cf_options.cc:1170] prepopulate_blob_cache: disable
2025/03/30-11:04:18.138892 8029035584 [options/cf_options.cc:1172] last_level_temperature: 0

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save