bishnubista
817e848d08
fix(audit-logs): route request audit log reads through logsDb
...
Route the read paths in queryRequestAuditLog.ts and
queryRequestAnalytics.ts through `logsDb` instead of
`primaryLogsDb`, matching the existing private audit log routes
(queryActionAuditLog, queryAccessAuditLog, queryConnectionAuditLog
all already use `logsDb`). In PostgreSQL deployments configured
with a read replica via `withReplicas` (see server/db/pg/logsDriver.ts),
this keeps high-volume audit log reads off the primary. No-op
in OSS-SQLite where `logsDb === primaryDb`.
Investigated rewriting `queryUniqueFilterAttributes` per the
in-line TODO ("SOMEONE PLEASE OPTIMIZE THIS!!!!!"). A candidate
rewrite using UNION ALL with six GROUP BY...LIMIT 500 arms
benchmarked 48-61% slower than the current SELECT DISTINCT
LIMIT 501 approach on SQLite (100k/300k/1M rows, 20 runs each):
each grouped arm materializes a temp B-tree before applying LIMIT,
while DISTINCT short-circuits via hash dedup with early exit.
A materialized facets table is likely the right long-term fix,
not a query-shape rewrite.
2026-05-25 10:37:47 -07:00
Owen
834672c846
Improve delete function speed & order of ops
2026-05-21 12:05:16 -07:00
Owen
2704202ba9
Add button to rebuid cache
2026-05-20 12:08:20 -07:00
Owen
1a0db10b1a
Verify button to verify cache
2026-05-20 11:15:15 -07:00
Owen
6e4a28f227
Add site information as well
2026-05-14 18:02:42 -07:00
Owen
d58b96f4b1
Add port and icmp information to api endpoint
2026-05-14 17:39:22 -07:00
Owen
6422208f69
Optimize get all relays
2026-05-14 16:59:15 -07:00
Owen
c3ebc423b5
Each node should only update its own sites
2026-05-14 16:51:09 -07:00
Owen
78ad2d17c7
Optimize building aliases in jit mode
2026-05-14 12:25:05 -07:00
Owen
5a8de8210b
Further optimizations
2026-05-14 11:59:59 -07:00
Owen
0e0666cacf
Optimize this
2026-05-14 11:34:09 -07:00
Owen
92a06e0ea3
Handle jit mode with syncs
2026-05-13 14:00:43 -07:00
Owen
c16d2ff2ed
Fix log message
2026-05-13 13:52:35 -07:00
miloschwartz
9fb677e952
allow editing self and owner user roles
2026-05-08 17:48:43 -07:00
Owen
114486608e
Add client endpoint to network log
2026-05-08 17:04:58 -07:00
Owen
5b8994d143
Cange to use primaryDb
2026-05-07 20:07:06 -07:00
Owen
4eb49e3e60
Make the rebuild long running function background
2026-05-07 15:40:34 -07:00
Owen
8ed01372b8
Add org to logs
2026-05-07 15:14:44 -07:00
Owen
adf4a1ffda
Link to http private resources
2026-05-06 11:03:38 -07:00
Owen
7d67fb9984
Make sure the domain is defined on a http resource
2026-05-05 20:07:06 -07:00
miloschwartz
2ecf076c0f
don't await second calculate func
2026-05-05 12:37:52 -07:00
miloschwartz
e06dda27cb
dont wait rebuild
2026-05-05 12:10:55 -07:00
miloschwartz
18f6e0f75d
add subscribed check back
2026-05-05 11:52:31 -07:00
Owen Schwartz
0e7aafd364
Merge pull request #2998 from Josh-Voyles/mem-fix-2
...
fix: deterministically finalize SQLite prepared statements to prevent native memory leak (#2120 )
2026-05-04 17:29:45 -07:00
Owen
d724f5bb5d
Add missing redirects and threshold to api
...
Fixes #2987
2026-05-04 10:46:11 -07:00
Owen
bcd164219f
Try to speed up
2026-05-03 12:29:48 -07:00
Mustafa
b2c8311b26
Merge branch 'fosrl:dev' into dev
2026-05-03 18:53:48 +02:00
Josh Voyles
9bd33072f4
cleaned comments - more concise
2026-05-03 00:00:11 -04:00
miloschwartz
3694f43ae8
dont early return on multi org
2026-05-02 20:38:14 -07:00
Owen
b8822b4d25
Fix CE not processing alert status
...
Fixes #2968
2026-05-02 13:38:05 -07:00
Josh Voyles
0655ba9423
fix: revert investigative changes, keep root cause fixes only
...
Reverts diagnostic instrumentation and defensive hardening added during
memory leak investigation. Only root cause fixes survive.
Root causes fixed:
- SQLite driver: auto-finalize wrapper + PRAGMAs
- WS routers: delete clientConfigVersions on disconnect (unbounded Map leak)
- WS private router: same + Redis key cleanup
Reverted:
- Memory monitor, rate limiting, request timeouts (diagnostic/hardening)
- shutdownAuditLogger wiring, audit re-queue change, debug logs (cleanup/secondary)
- package-lock.json drift
2026-05-02 16:33:13 -04:00
Owen
e1afbc226c
Allow configuring the webhook body
2026-05-02 13:26:54 -07:00
Owen
726e000154
Show remote nodes update in table
2026-05-02 11:55:01 -07:00
Josh Voyles
d6abe83fdc
fix: memory improvements
...
- SQLite: enable WAL mode and PRAGMA performance settings
- ws.ts (public + private): fix clientConfigVersions memory leak
- internal server: add rate limiting and request timeouts
- audit log: fix flush re-queue feedback loop
- memory: add monitoring instrumentation
- security: remove debug log of full request body
2026-05-02 07:37:18 -04:00
miloschwartz
9757c3d8b6
show newt version on site
2026-05-01 16:26:45 -07:00
Owen
53e096f7cb
Allow deleting account with trial
2026-05-01 15:01:48 -07:00
Owen
54d2d689c1
Run messaging for delete in the background as well
2026-04-30 14:38:03 -07:00
Owen
68f5512732
Handle messaging in the background; dont time out
2026-04-30 14:00:32 -07:00
miloschwartz
a029b107ae
dont show site online status for local sites
2026-04-29 12:35:08 -07:00
Owen
8c645315f3
Handle when siteIds is not provided
2026-04-29 10:59:36 -07:00
Owen
1d0a92c83e
Its in the transaction so we wait
2026-04-28 22:22:06 -07:00
Owen
a44100c2bd
Handle deleting client and orphaning resources
2026-04-28 22:19:22 -07:00
miloschwartz
2203ebf723
show user idp in devices
2026-04-28 21:27:11 -07:00
Owen
7e374baee9
Update if the ssl toggle changes
2026-04-28 20:45:20 -07:00
Owen
4cf6ca1d55
Force tcp and udp ports when http mode
2026-04-28 20:27:27 -07:00
Owen
de2a22aad8
Add missing imports
2026-04-28 16:52:35 -07:00
Owen
2a29062659
Use logsDb for the status history
2026-04-28 16:38:13 -07:00
Owen
592ca64253
Fix delete
2026-04-28 09:57:46 -07:00
Owen
81a6fb8d00
Dont import from postgres
2026-04-27 17:04:04 -07:00
Owen
dbee049ac8
Fix oss build issues
2026-04-27 16:30:54 -07:00