Commit Graph
9686 Commits
Author SHA1 Message Date
Sipke Schoorstra ec0c071ab6 Refactored minor internal affairs. 2015-08-22 23:07:55 +01:00
Sipke Schoorstra 86bae087fa Added support for eternal distributed locks.
Eternal locks never expire until they are explicitly released.
2015-08-22 22:55:00 +01:00
Sipke Schoorstra c5b0cac24a Removed unnecessary lock statements and updated tests.
The updated test needs to refresh the lock record entity since the DB record is updated using different connections (from child lifetime scopes).
2015-08-22 20:15:20 +01:00
Sipke Schoorstra 5f4cd14937 Changed the lifetime of DB services to match their lifetime scope.
This enables tests that involve multi threading and child lifetime scopes.
2015-08-22 20:13:46 +01:00
Sipke Schoorstra 7673e2e12f Non-functional change but more explicit.
Perhaps a bit subjective, but passing in a null value or a zero value controls whether the AcquireLockInternal will block or not, so probably better to provide an explicit Zero value from TryAcquireLock instead.
2015-08-22 18:10:43 +01:00
Sipke Schoorstra 3615cbe6db Added table index to DistributedLockRecord. 2015-08-22 18:04:12 +01:00
Sipke Schoorstra 5dcbad2235 Formatted code.
Moved static members to top of class.
2015-08-22 17:51:34 +01:00
Sipke Schoorstra 079fb1f84b Narrowed the lock scope to per-thread. 2015-08-22 17:11:03 +01:00
Sipke Schoorstra 1cf2b6cf27 Corrected message on ObsoleteAttribute applied to ITaskLeaseService/TaskLeaseService. 2015-08-22 17:05:42 +01:00
Sipke Schoorstra 81bf5d94fd Updated usages of ITaskLeaseService with IDistributedLockService. 2015-08-21 19:35:42 +01:00
Sipke Schoorstra 6c712a9840 Fixed bugs, refactored and polished distributed lock service.
- Added machine and thread scoped locking.
- Added support for blocking acquisitions.
- Added thread synchronization when creating and committing nested transactions for lock record creation and updates.
2015-08-21 15:22:32 +01:00
Sipke Schoorstra 61f1c3ae00 Simplified distributed locking implementation and did the following:
- Added Support for re-entry
- Made TryAcquireLock method thread-safe.
- Changed the way locks are released by decreasing their ref count. A lock is expired if: a) ref count == 0 or b) ExpiredUtc lies in the past. It is no longer necessary to delete a lock record (but would be fine, maybe as a background task).
2015-08-19 23:05:39 +01:00
Sipke Schoorstra 77b8df516a Improved locking code.
- Moved DatabaseLock into Framework and making it the default lock provider.
- Removed unnecessary thread synchronization code.
- Allowing multiple lock acquisitions from the same machine (simulating a "lease").
- Updated unit tests.
2015-08-11 16:43:48 +01:00
Sipke Schoorstra cb6835aba3 Updated AutomaticDataMigrations to take advantage of the DistributedLockService. 2015-08-10 18:08:00 +01:00
Sipke Schoorstra 0a9b05314e Changed dependency resolution.
This ensures dependency resolution works even when there's no work context (which happens when the code executes at the EndRequest event for example).
2015-08-10 18:06:57 +01:00
Sipke Schoorstra 01de9ef646 Addec leanup code to the ContainerTestBase. 2015-08-10 18:05:15 +01:00
Sipke Schoorstra 92c6d5fd80 Added logging statement in case of non-fatal exception. 2015-08-10 17:43:21 +01:00
Sipke Schoorstra 97fcfd4e24 Added tests for DistributedService. 2015-08-10 16:27:04 +01:00
Sipke Schoorstra 68c401c6eb Preventing usage disposed object and fixed EnsureLifetimeScope. 2015-08-10 15:27:15 +01:00
Sipke Schoorstra 16cd4e89c4 Added tests for DatabaseLock. 2015-08-10 15:24:18 +01:00
Sipke Schoorstra 17082eec9c Refactored disposal of DatabaseLock.
This ensures the cleanup will be able to resolve a database transaction even when it's Autofac that's disposing the object.
2015-08-10 15:13:03 +01:00
Sipke Schoorstra b62939f850 Implemented locking using ReaderWriterLockSlim and simplified logging statements. 2015-08-10 14:06:58 +01:00
Sipke Schoorstra ab12e9e630 Turned IDistributedLockService into an ISingleton. 2015-08-10 14:06:13 +01:00
Sipke Schoorstra f2e0fb22b3 Removed copy/paste artifact. 2015-08-10 13:48:54 +01:00
Sipke Schoorstra 15e6c95740 Added thread synchronization.
This ensures that only one thread at a time can acquire a lock.
2015-08-10 13:24:54 +01:00
Sipke Schoorstra 5813647574 Refactor renamed ILock to IDistributedLock.
Also refactored the IDistributedLockService to be more in line with general .NET patterns by return a boolean from the TryAcquire method.
2015-08-10 12:47:53 +01:00
Sipke Schoorstra f363ac2b5f Initial work on a distributed locking service. 2015-08-10 11:56:00 +01:00
Sipke Schoorstra d2c622dac6 Merge pull request #5626 from Xeevis/dev
Added woff2 mimetype
2015-08-09 10:37:59 +01:00
Xeevis f708a0f32e Added woff2 mimetype 2015-08-09 11:24:05 +02:00
Sipke Schoorstra 86b232aa52 Reformatted web.config and added some default mimetypes. 2015-08-06 21:04:12 +01:00
Sipke Schoorstra c724cf0fcf Merge branch '1.9.x' into dev
Conflicts:
	src/Orchard.Web/Modules/Orchard.DynamicForms/Module.txt
	src/Orchard.Web/Modules/Orchard.Rules/Module.txt
2015-08-06 20:52:13 +01:00
Sébastien Ros b206a656e8 Merge pull request #5603 from mahsaro/WidgetLayersOrder_1.9.x
Ordered layers alphabetically in Widget admin UI.
2015-08-06 12:41:19 -07:00
Sébastien Ros 32669d347a Merge pull request #5610 from psenechal/1.9.x
Update Module.txt
2015-08-06 12:40:44 -07:00
Sébastien Ros 5bdfb6e98a Merge pull request #5476 from dcinzona/patch-1
Added mimetype declarations to root web.config
2015-08-06 12:40:01 -07:00
Sébastien Ros 8f9d52307b Merge pull request #5615 from OrchardCMS/issue/4097/fix-duplicate-content
#4097: Changed Import to accommodate expected behavior as defined as …

Fixes #4097
2015-08-06 12:32:54 -07:00
Sébastien Ros 5f51c7c31a Merge pull request #5567 from OrchardCMS/issue/homepage-alias
Issue/homepage alias
2015-08-06 12:31:40 -07:00
Lombiq 85fd5c8320 Fixing registration settings infoset migration 2015-08-06 21:30:35 +02:00
Sébastien Ros 7e95f78ec9 Merge pull request #5619 from OrchardCMS/issue/5271/module-manifest-metadata
#5271: Added Lifecycle Status field to module manifest.

Fixes #5271
2015-08-06 12:20:35 -07:00
Sipke Schoorstra 4a88752ba8 #5271: Added Lifecycle Status field to module manifest.
- Module manifest extended with LifecycleStatus field.
- Updated Features screen to show lifecycle status if LifecycleStatus != Production.
- Updated the deprecated module manifests with the new lifecycle status (CustomForms, Media, MediaPicker and Rules).
2015-08-06 17:48:50 +01:00
Sebastien Ros 41bd9ce9bc Adding a file system backed output cache provider 2015-08-05 16:59:34 -07:00
Sebastien Ros e346170f24 Adding some documentation for IAppDataFolder 2015-08-05 14:21:22 -07:00
Sipke Schoorstra b1288ae5bc Minor code cleanup. 2015-08-05 17:18:40 +01:00
Sipke Schoorstra 98666530b4 #4097: Changed Import to accommodate expected behavior as defined as part of the issue.
This formalizes what we decided should happen when importing recipes in combination with various possible statuses a content item can have and how the import affects this.
2015-08-05 17:11:04 +01:00
Sipke Schoorstra ac1a279d1b #2540: Fixes an issue with NotifyFilter.
This fixes the case when a controller for example registers a notification and then returns a View result instead of a Redirect result.
When returning a View, the registered notifications would not be rendered until another page request occurred.

Fixes #2540
2015-08-05 14:03:44 +01:00
Sebastien Ros 430c3de460 Compressing output cache content in Redis 2015-08-04 17:28:49 -07:00
bleroy 6e8b4524d0 Delete ghost solution from 2010 from Orchard.ContentTypes module. 2015-08-04 16:50:07 -07:00
Philip Senechal a6f5e4fb01 Update Module.txt
Spelling corrections
2015-08-04 16:25:30 -07:00
Philip Senechal ff1fe79016 Update Module.txt
Language correction
2015-08-04 16:22:56 -07:00
Sipke Schoorstra 226dc719ab Merge pull request #5599 from mahsaro/dev
Importing/Exporting of Aliases.
2015-08-04 22:25:20 +01:00
mahsaro 5e58cf9d70 Removed extra line breaks. 2015-08-04 22:23:17 +01:00