Commit Graph
14354 Commits
Author SHA1 Message Date
John Colvin d609dcd3c2 cleanup: Remove unused code 2025-08-24 13:46:54 -04:00
John Colvin 7b266cd4d0 Reduce log noise in AsyncTCPConnection_AsyncWrapper 2025-08-24 13:46:54 -04:00
John Colvin de8593af5a TEMP changes to appsettings.json (at least i should review them before making permanent) 2025-08-24 13:46:54 -04:00
John Colvin ab6f6e1790 Add ColumnIndex class to resolve column names to indices
Improves performance compared to accessing columns by name
2025-08-24 13:46:54 -04:00
John Colvin 51e38ca793 Increase SQLiteEnumerator page size to 65536
This performs better, and doesn't seem to be too large in practice
2025-08-24 13:46:53 -04:00
John Colvin 7b2bc4b10c Serialize TimeSpan w/ microsecond precision in DataPacket json 2025-08-24 13:46:53 -04:00
John Colvin 05cae5c959 Format DateTimes w/ microsecond precision in DataPacketJsonConverter 2025-08-24 13:46:53 -04:00
John Colvin aaca8f0f3a Add BlueColumnTable for pandas integration
This will make it easier/more natural to support pandas column expressions
2025-08-24 13:46:53 -04:00
John Colvin 59a16677d1 Add c# Variant class, modeled after std::variant in c++ 2025-08-24 13:46:53 -04:00
John Colvin 50e7bba3d7 refactor: Rename snake_case fns PascalCase 2025-08-24 13:46:53 -04:00
John Colvin 6026ca0c62 refactor: Use dependency injection in DSQA 2025-08-24 13:46:53 -04:00
John Colvin 253512cef8 refactor: Load IDataStreamFactory(s) with dependency injection
So we can create ViewStreams that depend on other services, config, etc.
Previously, the PrimitiveManager relied purely on static construction of
types through reflection.
2025-08-24 13:46:53 -04:00
John Colvin ae050d9401 chore: Make BlueTableSchemaAdapter implement IBlueTableSchema 2025-08-24 13:46:53 -04:00
John Colvin eb0f386328 refactor: Rename "BlueTableSchemaAdaptor" with "er" 2025-08-24 13:46:53 -04:00
John Colvin b5aca5637c refactor: Replace DataPacket w/ IDataPacket in stream handlers 2025-08-24 13:46:53 -04:00
John Colvin 685507eed4 refactor: Change namespace to Bts.DataStreamCore for a few types
Since they're in the DataStreamCore csproj
2025-08-24 13:46:53 -04:00
John Colvin 6567baa7d5 Make 'name' default to CallerArgumentExpression for convenience 2025-08-24 13:46:52 -04:00
John Colvin 39dc6c24ed refactor: Replace if/else with switch cases 2025-08-24 13:46:52 -04:00
John Colvin 317a8cee60 cleanup: Remove over-engineered subcommands
We don't need explicit subcommands to 'run onixs' md (just use config).
2025-08-24 13:46:52 -04:00
John Colvin 9bb7beabc2 fix: Ensure IDGenerator instance is created before deref 2025-08-24 13:46:52 -04:00
John Colvin 2364c82254 fix: Expand undefined vars to empty string
Bugs (fixed):
  * Md shared memory file names have unexpanded variable: '${BTS_SHARED_MEMORY_PREFIX}'
2025-08-24 13:46:52 -04:00
John Colvin b3114f2a62 fix: Emplace MDConsumerHandle instead of copy assign 2025-08-24 13:46:52 -04:00
John Colvin b64a8ba214 cleanup: Remove unnecessary code
Trim includes as well
2025-08-24 13:46:52 -04:00
John Colvin b257b673fb improvement: Set SHARED_MEMORY_PREFIX to an environment variable
So we can effectively define it at runtime. We don't want to have to
produce different builds just to change the shared mem prefix.
2025-08-24 13:46:52 -04:00
John Colvin 43df2bbdc5 fix: Always prepend proc name to shared mem prefix
Our shared memory model isn't really designed to be shared across
processes. Maybe some day it will.
2025-08-24 13:46:52 -04:00
John Colvin 5f80492c93 cleanup: Remove redundant macro def 2025-08-24 13:46:52 -04:00
John Colvin 5a63b25a8f Skip md recording thread loop if no recorders configured to run 2025-08-24 13:46:51 -04:00
John Colvin 5647beed40 cleanup: Trivial whitespace cleanup in Protobuf.cmake 2025-08-24 13:46:51 -04:00
John Colvin d3900e3149 build: Clean up data_files cmake proj (support --target clean) 2025-08-24 13:46:51 -04:00
John Colvin 221505e243 fix build: Add ShmSegmentName.cpp to windows client sources 2025-08-24 13:46:51 -04:00
John Colvin d16c696ecf Add api server to docker compose 2025-08-24 13:46:51 -04:00
John Colvin c371fd8e99 Change api server ports so they don't conflict w/ ds webapp 2025-08-24 13:46:51 -04:00
John Colvin 16fb295a37 build: Resolve app data dir and shared mem prefix at runtime
We really can't define them at compile time anymore as we build multiple
exes that depend on libspark in the same dir (e.g., spark api server,
pubsub, ds-publisher, webapp, etc.). That means one libspark.so (or dll)
must serve all exes. We should compile a consistent libspark to mitigate
the risk of running an exe with the wrong version (of libspark). For
example, running pubsub with a libspark configured for spark api server,
leftover from an earlier build.
2025-08-24 13:46:51 -04:00
John Colvin bb157c768c Don't log "initializing spark config" if it has already been initialized 2025-08-24 13:46:51 -04:00
John Colvin 8c9ac51bb6 vscode: Add debug cfg for spark api server 2025-08-24 13:46:51 -04:00
John Colvin 39d04285d0 Use dependency injection in spark api server 2025-08-24 13:46:51 -04:00
John Colvin 41db558841 Add SparkLoggerAdapter for Msft ILogger 2025-08-24 13:46:51 -04:00
John Colvin cdebdd5765 fix: Don't assert on exception in BooleanExpression.evaluate
Bugs (fixed):
  * DataStream WebApp Server sometimes crashes when the user enters a
    bad query.
2025-08-24 13:46:50 -04:00
John Colvin bb7a000689 Assert that local ip address is successfully obtained 2025-08-24 13:46:50 -04:00
John Colvin d62816ac0b improvement: Resolve hostnames when comparing ip addrs
So we can to configure pubsub routes by hostname or ipv4 (ipv6 hasn't
been tested yet...so we should assume it doesn't work).
2025-08-24 13:46:50 -04:00
John Colvin 964ec5b565 Assert TcpConnection endpoint matches expected 2025-08-24 13:46:50 -04:00
John Colvin 46247b6439 Catch exceptions on AsyncTCPConnector_AsyncWrapper background thread
Since it spawns a new thread on each attempt, uncaught exceptions were previously undetected,
and caused silent failures down the pipe. This should make it easier to track such bugs down.
2025-08-24 13:46:50 -04:00
John Colvin 10e862074c fix: Format PubSubRoute as json in log msgs
It was previously using the default ToString, which simply returns the type name
2025-08-24 13:46:50 -04:00
John Colvin 9ce0bd1e35 build: Upgrade packages (deps) in DataStreamTests 2025-08-24 13:46:50 -04:00
John Colvin 6d93cf856f cleanup: Remove unused ViewStreamDatabase config 2025-08-24 13:46:50 -04:00
John Colvin fd68164eef vscode: Add PubSubServer debug cfg to skip build 2025-08-24 13:46:50 -04:00
John Colvin 863efdd53f Remove reference to spark protobuf Config in ViewStream
We can't read spark protobuf Config until it has been initialized,
and since ViewStream doesn't have the configServer param handy it
isn't able to initialize config if necessary. In that case, it would simply
block until config was initialized by someone else. Such a risk doesn't
seem justified for this particular configuration dependency
(DataStreamConfig.UseUncopiedNewRowsInFire). For now, its hardcoded to false.
2025-08-24 13:46:50 -04:00
John Colvin 3d94eabab7 refactor: Run RemoteQueryManager as an IHostedService
This paradigm more accurately represents the RemoteQueryManager as a
Service that can be started/stopped.
2025-08-24 13:46:50 -04:00
John Colvin 450ef9985a fix: Ensure spark config init and login are only performed once
As a static function that could be called from anywhere in the code
(directly or indirectly), 'Configuration.Initialize' was vulnerable to
race bugs. The "Configuration.get<T>()" method, whose calls are
ubiquitous in our code, would initialize config if it hadn't been done
so already. Without a reference to the configServer param, this param
would effectively be ignored/overridden with null.

It's important that login only be performed once, for obvious reasons
(our exes that connect to sparkd are generally designed to process data
for a single user). Furthermore, not every routine that requires a
successful login has a reference to the credentials needed to do it. To
address this, we now pass the ISparkdLoginService singleton to these
routines so they can wait until the singular login task has completed
before they begin.
2025-08-24 13:46:50 -04:00
John Colvin 0bf7e209a0 Assert ViewStreamDatabase.instance is only created once
The instance must be initialized via ViewStreamDatabase.SetGlobalInstance
2025-08-24 13:46:50 -04:00