Faris Ansari
e76c33cdbc
fix: cast values for renaming autoincrement documents
...
- cast `name` values to integer
- cast `link_field` values to string
2024-11-30 14:59:59 +05:30
Ankush Menat
16407a50ec
fix: Excessive gap locking from hash naming ( #28349 )
...
Because of large common prefix hash naming becomes "too sequential" when
doing a lot of concurrent writes.
I don't know a good tradeoff between both use cases:
1. Lots of reads - prefers large shared prefix.
2. Lots of writes - prefers small shared prefix.
But as of now this punishes writes too badly in form of excessive
locking. Until a better fix is found, it's better to keep it prefix free.
---
A better fix would be a tradeoff of between these two:
1. Reads - temporal locality should result in spatial locality on disk.
2. Writes - temporal locality should NOT result in spatial locality.
temporal locality = data inserted around same time
spatial locality = data sits next to each other in DB pages.
This can be achieved by adding a small request/job specific part to
prefix so each concurrent request has it's own different locality when
writing data.
2024-11-01 06:18:22 +00:00
David Arnold
fcae6050f0
Revert "refactor: place mappers into read-only mode" ( #28347 )
...
This reverts commit 583e4bf3e7b4a1a9930707515b16dba704309c55.
2024-10-31 20:35:28 +00:00
Raffael Meyer
73a04e9a5d
refactor(mapper): use doc.check_permission ( #28316 )
2024-10-31 19:52:47 +01:00
David Arnold
d5fd8d7c20
chore(docref): fix circular imports ( #28282 )
2024-10-24 22:31:12 +02:00
Akhil Narang
97bb23960d
refactor(rename_doc): also set a 10 hour timeout
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-10-24 11:25:41 +05:30
Akhil Narang
d5a73683db
refactor(rename): use long queue by default
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-10-23 17:38:37 +05:30
David Arnold
90e44d950e
fix: hashable is enough to serve as (composite) cache key ( #28189 )
2024-10-19 23:19:48 +02:00
David Arnold
2abba7b51b
fix: don't force values into the string type ( #28185 )
2024-10-19 19:00:25 +00:00
David Arnold
7348572af8
feat: docref identifier / proxy ( #27973 )
...
* feat: add DocRef
* feat: Add comprehensive test cases for DocRef functionality
* chore(db): add field type hints
* fix: ensure document stringer fulfills the DocRef contract
2024-10-19 09:40:26 +05:30
Gavin D'souza
b1d96dd532
refactor: Move children load db into separate method
...
Signed-off-by: Gavin D'souza <gavin.dsouza@switchup.de>
2024-10-17 19:18:59 +02:00
David Arnold
97c25594dc
refactor: place mappers into read-only mode ( #27956 )
2024-10-13 16:06:01 +02:00
David Arnold
0204db6547
chore: move to use new test record api ( #28105 )
2024-10-12 23:13:41 +00:00
Sagar Vora
30abcf66e8
fix: escape backslashes in repl to prevent syntax errors ( #28052 )
2024-10-09 14:28:14 +05:30
David Arnold
95950c8d81
refactor: organize test contextmanagers ( #28041 )
...
* refactor: prefer staticmethod decorator
* refactor: add cm register utility and keep cms in one file
* refactor: enter safe_exec enabled context (treewide)
* refactor: move trace fields to the other test context managers
* chore: marke all test_runner functions for deprecation
* chore: mark some tests.utils functions for deprecation (moved)
* chore: mark traced_field_conext for deprecation (moved)
* chore: placate semgrep in dumpster
* fix: show deprecation warnings per module in tests (incl. from dumpster)
* chore: remove use of deprecated functions from tests
2024-10-09 02:09:19 +02:00
David Arnold
5d3697500e
refactor: improve maintainability with a simple dispatcher ( #27975 )
...
* refactor: improve maintainability with a simple dispatcher
* refactor: improve maintainability with a init dispatcher on Document
* refactor: improve maintainability with an init dispatcher on meta
2024-10-06 16:56:40 +00:00
Mohamud Amin Ali
e6223b04fc
refactor: Explicit feedback to timestamp mismatch errror
...
Not necessarily a needed improvement but it adds explicitness to the feedback.
fix: text order
fix: type
2024-10-04 11:46:39 +02:00
David Arnold
c441be55e6
Merge pull request #27955 from blaggacao/feat/add-read-only-document-context
...
feat: add read only document mode
2024-10-04 00:12:08 +02:00
David
d05f70f9ba
fix: return correct types for owner and modified_by
2024-10-03 23:25:11 +02:00
David
1c4a0fe54f
feat: add read only document mode
2024-10-02 12:02:52 +02:00
Akhil Narang
22a64461aa
Merge pull request #27921 from barredterra/redirect-after-rename
...
feat: redirect to new record after rename
2024-10-01 15:53:37 +05:30
David Arnold
6ab44a883b
Merge pull request #27870 from blaggacao/feat/custom-section-and-column-placement
...
feat: improve placement for custom field sections and columns
2024-09-30 13:11:11 +02:00
Sumit Bhanushali
847dd62ec0
feat: permission log
2024-09-30 14:54:32 +05:30
barredterra
49c66c4d9f
feat: redirect to new form if it has been renamed
2024-09-27 18:30:35 +02:00
David
2de43f7797
feat: improve placement for custom field sections and columns
2024-09-26 12:54:30 +02:00
Akhil Narang
8260574f0d
Merge pull request #27659 from barredterra/mandatory-field-msg
...
fix: message for missing mandatory fields
2024-09-24 20:37:48 +05:30
Raffael Meyer
c73734715d
fix: update message needed for test
...
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2024-09-24 16:28:04 +02:00
Raffael Meyer
b91cacdd18
feat!: enhance Language to become more of a Locale ( #27178 )
2024-09-21 16:02:58 +02:00
Akhil Narang
578c9c1864
Merge pull request #27799 from ruthra-kumar/renumber_idx_on_remove
...
fix: re-number idx on child table row removal
2024-09-17 14:32:39 +05:30
ruthra kumar
2b8df89d55
fix: re-number idx on child table row removal
2024-09-17 14:19:57 +05:30
Gavin D'souza
15f6fcdf3e
fix(delete_doc): Check if submittable before docstatus validation
2024-09-13 18:50:50 +02:00
Akhil Narang
a87de09e79
fix(rename_doc): check permissions for the specific document
...
A user can have access to write to a document without having access to the whole doctype
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-09-13 11:16:53 +05:30
David
fe73c9f1aa
feat: add value tracer for test debugging
2024-09-05 21:58:19 +02:00
gavin
8aed92d569
Merge pull request #27618 from barredterra/refactor-data-field-validation
...
refactor: data field validation
2024-09-05 11:43:12 +02:00
barredterra
89443beb06
fix: message for missing mandatory fields
2024-09-05 10:45:32 +02:00
marination
a893341f95
fix: get_valid_fields excludes show_on_timeline, breaking migrations
...
Co-authored-by: Gavin <gavin.dsouza@switchup.de>
2024-09-02 17:27:50 +02:00
barredterra
6ba7e8e11d
fix: skip all validation if there's no data
2024-09-02 15:49:41 +02:00
barredterra
8836978b86
refactor: import validation utils
2024-09-02 15:49:08 +02:00
Gavin D'souza
074da5c553
fix: Separate meta.get_valid_fields from *columns
2024-08-28 18:12:42 +02:00
Gavin D'souza
151de897f1
fix: Use doc.get to safely check for attr
...
This bypasses the bungle during site creations when meta isn't present in
the database yet
2024-08-28 11:59:25 +02:00
Gavin D'souza
12e3cee4a6
fix!: Skip virtual fields in meta.get_valid_columns
2024-08-28 11:42:43 +02:00
Ninad1306
827acd2975
fix: update child table value from the last doc
2024-08-23 12:47:08 +05:30
Sagar Vora
3eeeab72a2
Merge pull request #27346 from Ninad1306/before_mapping
...
fix: Before Mapping the Doc run `before_mapping` hook
2024-08-22 15:11:33 +05:30
Akhil Narang
00401f741f
Merge pull request #27205 from barredterra/strings-in-validate_value
...
fix: translatable strings in doc.validate_value
2024-08-20 17:12:00 +05:30
Ninad1306
19ded8361b
fix: before mapping the doc run before_mapping hook
2024-08-08 17:54:09 +05:30
Rushabh Mehta
774d86f642
feat: Workspace Settings - allow enabling and disabling of workspaces during setup
2024-08-04 13:41:08 +05:30
barredterra
4f3b096f64
fix: translatable strings in doc.validate_value
2024-07-24 18:38:22 +02:00
Akhil Narang
5e95e51219
fix: don't trigger Value Change notifications for deleted documents
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-07-16 18:07:15 +05:30
Akhil Narang
f2d418ce43
Merge pull request #27100 from gavindsouza/misc-fixes-12_07_24
...
fix: Misc fixes
2024-07-15 17:50:11 +05:30
Gavin D'souza
84919bfe8e
fix: Typing hint for Document.get_doc_before_save
2024-07-15 09:25:08 +02:00