Prevents 'Synchronous operations are disallowed' error when rendering
large MVC views (e.g. Account settings page with multiple tabs in
non-English locales).
- Replace FormattedStringValueExtracter.Extract with LastIndexOf in
PermissionGrantCacheItem and ResourcePermissionGrantCacheItem to
eliminate repeated string tokenization and object allocations on
every cache key parse (~12,000 calls per request with 4000+ permissions)
- Add fast-path in SimpleStateCheckerManager.InternalIsEnabledAsync to
skip DI scope creation when both StateCheckers and GlobalStateCheckers
are empty, avoiding thousands of unnecessary scope allocations
- Optimize PermissionChecker.IsGrantedAsync(string[]) and
ResourcePermissionChecker.IsGrantedAsync(string[], resourceName, resourceKey)
to load all permission definitions once via GetPermissionsAsync /
GetResourcePermissionsAsync instead of N individual GetOrNullAsync calls,
and use batch StateCheckerManager.IsEnabledAsync for state checking
- Optimize AbpApplicationConfigurationAppService.GetAuthConfigAsync to
pre-load all permission names into a HashSet for O(1) lookup instead
of N async GetOrNullAsync calls inside the loop
- Fix GetResourcePermissionsAsync to deduplicate by (ResourceName, Name)
instead of Name only, matching the actual uniqueness constraint of
resource permissions defined in PermissionDefinitionContext
Production impact (customer with 4000+ permissions): 10s+ -> ~682ms
- WriteInitLogs now uses ILoggerFactory to flush all InitLogger
categories with their original category name instead of only
flushing AbpApplicationBase
- Add CategoryName to AbpInitLogEntry, recorded automatically by
DefaultInitLogger<T> using typeof(T).FullName
- Add GetAllEntries/ClearAllEntries to IInitLoggerFactory interface
- Add GetReferencedAssemblies filter to skip non-ABP assemblies
- Handle ReflectionTypeLoadException separately from other exceptions
- Add CategoryName null/empty fallback in WriteInitLogs
- Skip DisablePropertyInjection types from orphaned module detection
When a type's assembly contains an ABP module but is not part of the
module dependency chain, Autofac's property injection is silently
skipped. This causes LazyServiceProvider and other injected properties
to remain null, leading to NullReferenceException at runtime.
This change detects the misconfiguration at startup and logs a warning
with the affected assembly name, module type, and a fix suggestion.
- Upgrade Autofac from 8.4.0 to 9.1.0
- Upgrade Autofac.Extensions.DependencyInjection from 10.0.0 to 11.0.0
- Upgrade Microsoft.Bcl.AsyncInterfaces from 10.0.2 to 10.0.4
- Remove AnyKeyRegistrationSource (now native in Autofac 9.1.0)
- Add MSDI KeyedService.AnyKey to Autofac KeyedService.AnyKey translation
- Use Parameters.KeyedServiceKey<object>() for keyed factory key retrieval
- Add ExternallyOwned() to instance registrations
- Add unit tests for keyed services and AnyKey support
* Fix stdout/stderr deadlock in CmdHelper.RunCmdAndGetOutput
Read stdout and stderr concurrently to prevent pipe buffer deadlock.
The sequential ReadToEnd() calls caused a hang when child processes
(e.g. dotnet build) produced enough stderr output to fill the OS
pipe buffer (~4KB on Windows), since the parent blocked on stdout
while the child blocked on stderr.
Made-with: Cursor
* Simplify Task.WhenAll result handling per review
Made-with: Cursor
* Add test for CmdHelper to prevent stdout/stderr deadlock
* Reduce timeout in deadlock test for CmdHelper to 10 seconds
---------
Co-authored-by: maliming <malimings@gmail.com>
Update .gitignore to exclude **/.abpstudio/** (and normalize newline for an existing entry). Add an "id" field to framework/Volo.Abp.abpsln (9f9e3d5f-6a9a-4b00-ac5a-746c65981918) to record the solution identifier.
- Remove "Unknown event name" exception from all providers and LocalEventBus
to match typed PublishAsync behavior (no handler = silent, not exception)
- Use ABP's IJsonSerializer instead of System.Text.Json for ConvertDynamicEventData
to respect configured JSON serialization options
- Fix Hangfire/Quartz UpdateScheduleAsync to operate directly on persistent
scheduler state without checking the in-memory registry, consistent with
the RemoveAsync fix; this allows updating schedules after restart
- Revert TickerQ IsRegistered to return false instead of throwing;
a boolean query method should not throw exceptions
- Update docs: note that UpdateScheduleAsync works after restart for
persistent providers
- Fix reflection method lookup in DefaultDynamicBackgroundJobManager to match by parameter types
- Add StopAllAsync to IDynamicBackgroundWorkerManager interface and all implementations
- Add semaphore locking to StopAllAsync in DefaultDynamicBackgroundWorkerManager with volatile _isDisposed
- Fix HangfireDynamicBackgroundWorkerManager.GetCron to match existing HangfireBackgroundWorkerManager format
- Fix QuartzDynamicBackgroundWorkerManager.UpdateScheduleAsync to reuse BuildTrigger method
- Fix TickerQDynamicBackgroundWorkerManager.IsRegistered to throw AbpException (consistent with other methods)
- Add GetAllNames and Clear to IDynamicBackgroundWorkerHandlerRegistry
- Call StopAllAsync in AbpBackgroundWorkersModule.OnApplicationShutdownAsync
- Move DynamicBackgroundWorkerManager_Tests to correct namespace/directory
- Fix singleton state pollution in BackgroundJobManager_Tests
- Update docs to warn about handler loss after restart for dynamic jobs and workers
Add SemaphoreSlim to DefaultDynamicBackgroundWorkerManager to protect
AddAsync/RemoveAsync/UpdateScheduleAsync from concurrent access on the
same worker name. Add 3 concurrency test cases covering concurrent
same-name add, concurrent add+remove, and concurrent mixed operations.