Commit Graph

113 Commits

Author SHA1 Message Date
Sebastiaan Janssen
e8a9c4da2e Merge branch 'v8/dev' into v8/contrib 2021-03-31 13:01:25 +02:00
Mole
507c821f66 Create method for generating log message
And remove forgotten comments.
2021-03-19 13:19:39 +01:00
Mole
95f42487d4 Wrap dumping dictionaries in a method. 2021-03-19 08:37:23 +01:00
Mole
8f50bdbef4 Apply suggestions from review 2021-03-18 11:24:14 +01:00
Mole
c504e3ab7e Clean 2021-03-17 13:40:14 +01:00
Mole
9bd1b06eaf Only create the dicts and hashset when a lock is requested 2021-03-17 13:09:45 +01:00
Mole
54a4a76efb Use a hashset to keep track of acquired locks
This simplifies disposing/checking for locks greatly.
2021-03-17 11:10:34 +01:00
Mole
d1afb6eabc Merge remote-tracking branch 'origin/v8/dev' into v8/feature/10613-distributed-locks 2021-03-15 13:19:36 +01:00
Shannon Deminick
d0f047e729 Fixes and Updates for DB Scope and Ambient Context leaks (#9953)
* Adds some scope tests (ported back from netcore) and provides a much better error message, ensure execution context is not flowed to child tasks that shouldn't leak any current ambient context

* updates comment

* Ensure SqlMainDomLock suppresses execution context too

* Since we're awaiting a task in a library method, ConfigureAwait(false)

* missing null check

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2021-03-15 12:56:38 +01:00
Mole
92fd9ff685 Clean 2021-03-15 11:31:23 +01:00
Mole
ef59829489 Throw error if all scopes hasn't been disposed 2021-03-15 08:54:52 +01:00
Mole
cee33e863e Fix errors shown in unit tests 2021-03-15 08:38:23 +01:00
Mole
5c7e4f8dde Adjust unit tests and apply fixes to scope 2021-03-12 13:10:17 +01:00
Sebastiaan Janssen
9b39bfbf51 Merge branch 'v8/dev' into v8/contrib 2021-03-12 09:30:30 +01:00
Mole
498a5e0c66 Initial rework of Lock dictionaries 2021-03-11 15:52:14 +01:00
Mole
adf504c20c Fix IncrementRequestedWriteLock 2021-03-09 09:33:34 +01:00
Mole
b554aa9484 Apply suggestions from code review
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-03-09 08:22:16 +01:00
Mole
6898fd2784 Only lock once when decrementing 2021-03-09 08:19:40 +01:00
Mole
f072387096 Wrap access to dictionaries in locks and make dictionaries internal readonly 2021-03-03 08:55:14 +01:00
Mole
c01fab97b8 Count requested locks in child scopes with the existing dictionaries.
This way we don't have to have a two dictionaries AND two lists.
2021-03-02 13:55:30 +01:00
Mole
8c99a8e8a7 Combine the two lock inner methods into one
And add a couple of more unit tests
2021-03-02 13:07:04 +01:00
Mole
65f2c5ee70 Bit of cleaning in Scope 2021-03-02 08:48:09 +01:00
Mole
400b436d98 Fir stab/POC
This still need ALOT of work, but is just an attempt to get my head around things.
2021-03-01 16:06:16 +01:00
Chad
b8540ca128 Improve speed and reduce allocations by implementing logger overloads to avoid params [] allocation (#8917)
* Implement logger overloads to avoid params [] allocation

* Implement console logger ILogger

* Call correct signature

* Fix exceptions

* Introduce ILogger2

* fix logger reference

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2021-02-22 08:22:49 +10:00
Sebastiaan Janssen
2c54adacf2 Add the ability to change the SQL Write Lock TimeOut (#9750)
Co-authored-by: Shannon <sdeminick@gmail.com>
2021-02-20 13:44:15 +01:00
Shannon
1513a12549 Introduce a new IMainDomLock and both default and sql implementations 2019-12-10 13:33:59 +01:00
Shannon
d0435f6625 Moves read/write locking and isolation level to the responsibility of the sql provider based on the db type 2019-10-15 00:04:41 +11:00
Stephan
a6568e1952 NuCache: better fixing, cleanup 2019-03-15 08:22:40 +01:00
Stephan
541c7e6955 NuCache: cleanup scoped objects 2019-03-14 18:56:27 +01:00
Stephan
db4d88b2dc Shorten shadow filesystems identifiers 2019-02-20 14:10:15 +01:00
Chris Houston
193e24afd2 Fixing all the TODO, FIXME & HACK comments so they all follow the same layout. 2019-01-27 11:16:00 +01:00
Chris Houston
a13a38a482 Updated all the TODO: comments in the Umbraco.Core project so they are all in the same format. ( // TODO: ) (#4220)
Also moved some of the comments so they are will work better / are not within Code Documentation comments
2019-01-26 15:42:14 +01:00
Chris Houston
78319bae9e Temp8 fix typos 2 (#4130) 2019-01-23 00:03:39 +01:00
Stephan
4a0b969777 Deal with fixme in Umbraco.Core 2019-01-21 16:01:37 +01:00
Stephan
0bee01e0ee Great AppCaches renaming 2019-01-17 11:01:23 +01:00
Stephan
c17ee34edb Support enlisting in exiting scope contexts (why not?) 2019-01-14 08:09:43 +01:00
Stephan
19ae9f5dee Refactor configuration for DI 2019-01-07 19:40:07 +01:00
Stephan
adced099be Move UmbracoConfig singleton to Current 2018-12-12 23:31:16 +01:00
Warren
2a298aaaf5 FIRST PASS - Updates Umbraco.Core project to not use the func overload & to use new message template instead 2018-08-14 15:08:32 +01:00
Stephan
6a05c556b5 Merge pull request #2751 from lkoruba/hackathon-use-logger-warn-with-func
(V8 Hackathon) use logger warn with func<string>
2018-06-29 16:43:22 +02:00
lkoruba
7e4f2957a3 Change calls to logger.Warn method to use Func<string> parameter 2018-06-29 14:53:41 +02:00
Dawid Koruba
51ab9e32de Change calls to logger.Debug method to use Func<string> parameter 2018-06-29 12:35:31 +02:00
Shannon
c46d4e9e43 Merge remote-tracking branch 'origin/dev-v7' into dev-v8
# Conflicts:
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
#	src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs
#	src/Umbraco.Core/Persistence/PetaPoco.cs
#	src/Umbraco.Core/Scoping/NoScope.cs
#	src/Umbraco.Core/Scoping/ScopeProvider.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Tests/Persistence/Migrations/MigrationStartupHandlerTests.cs
#	src/Umbraco.Tests/UI/LegacyDialogTests.cs
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
#	src/Umbraco.Web.UI/umbraco/config/create/UI.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/zh.xml
#	src/Umbraco.Web/BatchedDatabaseServerMessenger.cs
#	src/Umbraco.Web/Editors/ContentController.cs
#	src/Umbraco.Web/Editors/MediaTypeController.cs
#	src/Umbraco.Web/HealthCheck/Checks/Security/ClickJackingCheck.cs
#	src/Umbraco.Web/HealthCheck/Checks/Security/ExcessiveHeadersCheck.cs
#	src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyBasicConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyDisplayConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyDtoConverter.cs
#	src/Umbraco.Web/Models/Mapping/ContentPropertyModelMapper.cs
#	src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/ParameterEditors/MultipleContentPickerParameterEditor.cs
#	src/Umbraco.Web/Trees/ContentTreeControllerBase.cs
#	src/Umbraco.Web/umbraco.presentation/umbraco/create/MemberGroupTasks.cs
2018-04-19 23:41:35 +10:00
Claus
c630e5ef8e only warn if there's actually anything to warn about 2018-04-12 14:26:14 +02:00
Stephan
1076b882fb U4-11207 - collect rogue/leaked NoScope instances 2018-04-12 11:56:56 +02:00
Stephan
4a47c5e129 U4-11207 - fix scope leaks caused by database messenger 2018-04-12 11:13:00 +02:00
Stephan
d40a835701 Port v7@2aa0dfb2c5 - WIP 2018-03-27 10:51:41 +02:00
Stephan
a9147f1473 Port v7@2aa0dfb2c5 - WIP 2018-03-22 11:25:22 +01:00
Stephan
e774717346 U4-10897 - expose enlisted mutable Xml in events 2018-01-30 13:14:01 +01:00
Stephan
f6314e1361 Cleanup 2017-12-18 17:13:29 +01:00