shareddata 6.85.10__tar.gz → 6.85.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shareddata-6.85.10/src/shareddata.egg-info → shareddata-6.85.11}/PKG-INFO +1 -1
- {shareddata-6.85.10 → shareddata-6.85.11}/setup.py +1 -1
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/CollectionMongoDB.py +1 -1
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Table.py +20 -2
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableDisk.py +6 -1
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableRewrite.py +58 -4
- {shareddata-6.85.10 → shareddata-6.85.11/src/shareddata.egg-info}/PKG-INFO +1 -1
- {shareddata-6.85.10 → shareddata-6.85.11}/LICENSE +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/MANIFEST.in +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/README.md +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/pyproject.toml +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/setup.cfg +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/ServerGunicorn.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/ServerWaitress.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/apidocs-dark.css +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/apidocs.yml +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/auth.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/constants.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/download_paths.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/download_slots.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/install/worker.ps1 +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/install/worker.sh +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/listcache.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/cache.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/collections.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/data.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/downloads.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/metadata.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/operations.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/schedules.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/sqlite.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/system.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/tables.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/timeseries.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/web_routes.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/routes/workers.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/API/utils.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Auth/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Auth/bootstrap.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Auth/migrate.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Auth/store.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Auth/workers.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/CacheRedis.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/catalog.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/config.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/errors.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/indexes.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/readers.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/resolve.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/DataAPI/service.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Database.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Defaults.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/AWSEC2.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/AWSS3.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/AutoDocstrings.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/ClientAPI.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/ClientSocket.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/ClientWebSocket.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/LogHandlerAPI.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/LogReader.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/MongoDBClient.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/SaveTables.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/ServerSocket.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/ServerWebSocket.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/StreamsCache.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/StreamsPersist.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/SyncTable.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/TunnelWebSocket.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/IO/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Listing.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/LockWaiters.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Logger.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/MCP/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/MCP/__main__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/MCP/client.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/MCP/server.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Metadata.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/MultiProc.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/OpenFIGI.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Redaction.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/ArchiveOldCollections.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/BatchJob.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/ContainerHealth.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/JobStore.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/RoutineCommand.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/RoutineOrigin.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/Schedule.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/ScheduleMirror.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/ScheduleMonitor.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/ScheduleStore.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/Scheduler.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/UpdateActiveJobs.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/Worker.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/WorkerBootstrap.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/WorkerLib.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/WorkerPool.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Routines/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/SQLite.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/SharedData.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/SharedNumpy.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/StreamKafka.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Symbol.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableIndex.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableIndexJitFunctions.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableIndexJitFunctionsManual.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableIndexJitGenerate.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableIndexJitHash.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableIndexJitLoc.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableProtocol.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TableRead.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TimeSeriesDisk.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/TimeseriesContainer.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Users.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Utils.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/ADDING_A_PAGE.md +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/activity_logger.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/app.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/dashAgGridComponentFunctions.js +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/dashAgGridFunctions.js +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/google_logo.png +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/kafka_keys.js +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/logs.css +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/sched.css +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/styles.css +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/auth.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/backends.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/config.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/containers.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/identity.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/kafka_view.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/mongo_view.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/proc.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/redis_view.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/route_health.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/route_registry.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/sched.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/schedule_editor.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/server.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/services.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/shell.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/standalone.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/account.js +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/custom.css +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/favicon.ico +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/favicon.png +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/logo.png +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/logo_96x96.png +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/shareddata-mark.svg +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/shell.css +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/shell.js +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/standalone.css +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/static/standalone.js +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/suggest.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/account.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/base.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/claim.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/claim_done.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/dash.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/index.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/login.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/login_2fa.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/partials/navbar.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/partials/scripts.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/recovery_codes.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/shell.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/standalone.html +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/twofactor.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/utils.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/workerpool.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/__init__.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/build_info.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/fleet.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/preflight.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/private_files.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/release_backup.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/server.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/services.py +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/sharedmutexwin.pyd +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/shareddata.egg-info/SOURCES.txt +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/shareddata.egg-info/dependency_links.txt +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/shareddata.egg-info/entry_points.txt +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/shareddata.egg-info/requires.txt +0 -0
- {shareddata-6.85.10 → shareddata-6.85.11}/src/shareddata.egg-info/top_level.txt +0 -0
|
@@ -321,7 +321,7 @@ class CollectionMongoDB:
|
|
|
321
321
|
# Insert all prepared documents into the collection
|
|
322
322
|
result = []
|
|
323
323
|
if documents_to_insert:
|
|
324
|
-
result = self._collection.insert_many(documents_to_insert)
|
|
324
|
+
result = self._collection.insert_many(documents_to_insert, ordered=False)
|
|
325
325
|
|
|
326
326
|
return result
|
|
327
327
|
|
|
@@ -687,8 +687,18 @@ class Table:
|
|
|
687
687
|
records, so they are removed and rebuilt from the new empty header.
|
|
688
688
|
"""
|
|
689
689
|
from SharedData.TableRewrite import (RewriteError, fsync_directory,
|
|
690
|
-
|
|
691
|
-
|
|
690
|
+
rewrite_supported)
|
|
691
|
+
if not rewrite_supported():
|
|
692
|
+
# No POSIX rename-over-a-mapped-file: remove the old files (the shared mutex is held in STRUCT
|
|
693
|
+
# mode, so this process is their only user; another process that still maps one makes the
|
|
694
|
+
# unlink fail loudly) and create the empty image in place.
|
|
695
|
+
for name in ('data.bin', 'bson.bin', 'dateidx.bin', 'pkey.bin', 'symbolidx.bin', 'portidx.bin'):
|
|
696
|
+
try:
|
|
697
|
+
(self.filepath.parent / name).unlink()
|
|
698
|
+
except FileNotFoundError:
|
|
699
|
+
pass
|
|
700
|
+
self.malloc(create=True)
|
|
701
|
+
return
|
|
692
702
|
final = self.filepath
|
|
693
703
|
old = os.stat(final)
|
|
694
704
|
# The writer lock is held: any earlier stage is from a build that died.
|
|
@@ -1659,6 +1669,10 @@ class Table:
|
|
|
1659
1669
|
|
|
1660
1670
|
def compact_bson_if_worthwhile(self):
|
|
1661
1671
|
"""Compact the BSON file when enough of it is orphaned; None when it is not worth a rewrite."""
|
|
1672
|
+
if self.type == 1:
|
|
1673
|
+
from SharedData.TableRewrite import rewrite_supported
|
|
1674
|
+
if not rewrite_supported():
|
|
1675
|
+
return None # the pair publication needs POSIX file APIs; compaction only saves space
|
|
1662
1676
|
usage = self.bson_usage()
|
|
1663
1677
|
if usage['orphaned'] < BSON_DEFRAG_MIN_BYTES \
|
|
1664
1678
|
or usage['orphaned'] < BSON_DEFRAG_MIN_FRACTION * max(usage['used'], 1):
|
|
@@ -1820,6 +1834,10 @@ class Table:
|
|
|
1820
1834
|
Exception: If the table is not schemaless or if defragmentation fails.
|
|
1821
1835
|
"""
|
|
1822
1836
|
if self.type == 1:
|
|
1837
|
+
from SharedData.TableRewrite import rewrite_supported
|
|
1838
|
+
if not rewrite_supported():
|
|
1839
|
+
Logger.log.warning(f'{self.relpath} BSON not compacted: the pair publication needs POSIX file APIs')
|
|
1840
|
+
return {'original_size': 0, 'new_size': 0, 'reclaimed': 0}
|
|
1823
1841
|
return self._defragment_bson_disk(chunk_size, acquire)
|
|
1824
1842
|
if not self.is_schemaless:
|
|
1825
1843
|
raise Exception(f'Cannot defragment non-schemaless table {self.relpath}')
|
|
@@ -300,7 +300,12 @@ class TableDisk(Table):
|
|
|
300
300
|
"""
|
|
301
301
|
if self.hdr['recordssize'] <= self.hdr['count']:
|
|
302
302
|
return self
|
|
303
|
-
from SharedData.TableRewrite import publish_rewrite
|
|
303
|
+
from SharedData.TableRewrite import publish_rewrite, rewrite_supported
|
|
304
|
+
if not rewrite_supported():
|
|
305
|
+
# Shrinking needs a second file replacing the mapped one (Linux). Trim only returns unused space,
|
|
306
|
+
# so the table is left as it is rather than failing.
|
|
307
|
+
Logger.log.warning('%s not trimmed: shrinking a disk table needs POSIX file APIs' % self.relpath)
|
|
308
|
+
return self
|
|
304
309
|
return publish_rewrite(self, None, 'trim', capacity=max(2, int(self.hdr['count'])))
|
|
305
310
|
|
|
306
311
|
############### RELOAD ###############
|
|
@@ -38,14 +38,66 @@ def fsync_directory(path):
|
|
|
38
38
|
os.close(fd)
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
def rewrite_supported():
|
|
42
|
+
"""True where the staged, crash-safe rewrite can run (Linux POSIX APIs)."""
|
|
43
|
+
return sys.platform == 'linux' and all(hasattr(os, name) for name in (
|
|
44
|
+
'O_DIRECTORY', 'fchown', 'fchmod', 'posix_fallocate',
|
|
45
|
+
'listxattr', 'getxattr', 'setxattr'))
|
|
46
|
+
|
|
47
|
+
|
|
41
48
|
def require_rewrite_support():
|
|
42
|
-
if
|
|
43
|
-
'O_DIRECTORY', 'fchown', 'fchmod', 'posix_fallocate',
|
|
44
|
-
'listxattr', 'getxattr', 'setxattr')):
|
|
49
|
+
if not rewrite_supported():
|
|
45
50
|
raise RewriteError('crash-safe disk record rewrites require Linux POSIX APIs; '
|
|
46
51
|
'sort/trim/rewrite recovery is unsupported on this platform')
|
|
47
52
|
|
|
48
53
|
|
|
54
|
+
def _publish_in_place(table, order, operation, *, capacity, start, sorted_flag, header_updates, transform, bson):
|
|
55
|
+
"""Platforms without the staged rewrite (Windows): permute the rows in the mapped image itself.
|
|
56
|
+
|
|
57
|
+
The shared mutex is held in STRUCT mode by the caller, so no other process or thread reads or writes
|
|
58
|
+
the table meanwhile and nothing needs a replacement file (which Windows could not even rename over a
|
|
59
|
+
mapped file). This is the pre-6.85 behaviour and it is NOT crash-safe: a crash inside the permutation
|
|
60
|
+
leaves a table the next owner finds in STRUCT mode, and it rebuilds the index, but it cannot undo a
|
|
61
|
+
half-moved row range. Only record-preserving operations (sort, cleanup) are supported here; whatever
|
|
62
|
+
needs a second file (trim, BSON pair) is refused.
|
|
63
|
+
"""
|
|
64
|
+
if bson is not None or transform is not None or operation not in ('sort', 'cleanup'):
|
|
65
|
+
raise RewriteError(f'{operation} needs the staged rewrite, which requires Linux POSIX APIs')
|
|
66
|
+
if capacity is not None and int(capacity) != int(table.hdr['recordssize']):
|
|
67
|
+
raise RewriteError(f'{operation} with a new capacity needs the staged rewrite (Linux only)')
|
|
68
|
+
if table.type != 1 or not table._owns_lock():
|
|
69
|
+
raise RewriteError('disk record publication requires writer ownership')
|
|
70
|
+
table._sync_held_mapping()
|
|
71
|
+
old_count = int(table.hdr['count'])
|
|
72
|
+
rows = table.records.view(np.ndarray)
|
|
73
|
+
if len(rows) < old_count:
|
|
74
|
+
raise RewriteError('stale rewrite source bounds')
|
|
75
|
+
if order is None:
|
|
76
|
+
count = old_count
|
|
77
|
+
else:
|
|
78
|
+
order = np.asarray(order)
|
|
79
|
+
if np.any(order < 0) or np.any(order >= old_count):
|
|
80
|
+
raise RewriteError('replacement source out of range')
|
|
81
|
+
if operation == 'sort' and not np.array_equal(np.sort(order), np.arange(old_count)):
|
|
82
|
+
raise RewriteError('record-preserving rewrite requires a complete permutation')
|
|
83
|
+
count = len(order)
|
|
84
|
+
chosen = rows[order] # fancy indexing copies: safe to overwrite the source rows
|
|
85
|
+
rows[:count] = chosen
|
|
86
|
+
if count < old_count:
|
|
87
|
+
rows[count:old_count] = np.zeros((), dtype=rows.dtype)
|
|
88
|
+
table.hdr['count'] = count
|
|
89
|
+
table.hdr['isidxcreated'] = 0
|
|
90
|
+
if sorted_flag is not None:
|
|
91
|
+
table.hdr['isidxsorted'] = sorted_flag
|
|
92
|
+
table.hdr['minchgid'] = min(int(table.hdr['minchgid']), int(start))
|
|
93
|
+
for field, value in (header_updates or {}).items():
|
|
94
|
+
table.hdr[field] = value
|
|
95
|
+
table.shf_data.flush()
|
|
96
|
+
sync_header(table)
|
|
97
|
+
table.index.rebuild_index_only()
|
|
98
|
+
return table.records
|
|
99
|
+
|
|
100
|
+
|
|
49
101
|
def sync_file(path):
|
|
50
102
|
with open(path, 'r+b' if os.name == 'nt' else 'rb') as stream:
|
|
51
103
|
os.fsync(stream.fileno())
|
|
@@ -325,7 +377,9 @@ def publish_rewrite(table, order, operation, *, capacity=None, start=0, sorted_f
|
|
|
325
377
|
names a complete, synced BSON replacement built beside bson.bin: both files are then published as a pair
|
|
326
378
|
(BSON first, records second, a version 2 descriptor makes the pair recoverable).
|
|
327
379
|
"""
|
|
328
|
-
|
|
380
|
+
if not rewrite_supported():
|
|
381
|
+
return _publish_in_place(table, order, operation, capacity=capacity, start=start, sorted_flag=sorted_flag,
|
|
382
|
+
header_updates=header_updates, transform=transform, bson=bson)
|
|
329
383
|
if table.type != 1 or not table._owns_lock():
|
|
330
384
|
raise RewriteError('disk record publication requires writer ownership')
|
|
331
385
|
if pending_path(table).exists():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/assets/dashAgGridComponentFunctions.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{shareddata-6.85.10 → shareddata-6.85.11}/src/SharedData/Web/templates/partials/scripts.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|