| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
We need stricter locking before we can unload
|
| |
| |
| |
| |
| |
| | |
* only test the upgrade path,
* add test to verify non upgrades can’t preempt,
* add reentrancy assertion.
|
| |
| |
| |
| |
| |
| | |
Specifically, clean up if the thread is killed while it's blocked
awaiting the lock... if we get killed on some other arbitrary line, the
result remains quite undefined.
|
| | |
|
| |
| |
| |
| |
| |
| | |
I accidentally discovered `assert_threads_not_stuck` couldn't fail, so
the simplest solution was to prove they're all now working in both
directions.
|
| |
| |
| |
| |
| | |
If the thread isn't yet holding any form of lock, it has no claim over
what may / may not run while it's blocked.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Specifically, the "loose upgrades" behaviour that allows us to obtain an
exclusive right to load things while other requests are in progress (but
waiting on the exclusive lock for themselves) prevents us from treating
load & unload interchangeably: new things appearing is fine, but they do
*not* expect previously-present constants to vanish.
We can still use loose upgrades for unloading -- once someone has
decided to unload, they don't really care if someone else gets there
first -- it just needs to be tracked separately.
|
| |
| |
| |
| | |
this fixes a failing test case
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The note regarding the `_prefix` and `_suffix` options is no longer
useful since they were renamed specifically for this purpose.
Also the given example doesn't show what these options enable and in
which case they are really useful (when there are conflicting values
for instance).
Refs #20999.
[Godfrey Chan & Robin Dupret]
|
|\ \
| | |
| | | |
Rename the enum_prefix and enum_suffix options to _prefix and _suffix
|
|/ /
| |
| |
| |
| |
| | |
This makes it more clear that they are reserved keywords and also it
seems less redundant as the line already starts with the call to the
`enum` method.
|
|\ \
| | |
| | | |
Fixes documentation typo.[ci skip]
|
|/ /
| |
| | |
Documentation had extra colon after keyword.
|
|\ \
| | |
| | | |
Don't apply locking around basic #load / #require
|
| |/
| |
| |
| |
| |
| | |
That's outside our remit, and dangerous... if a caller has their own
locking to protect against the natural race danger, we'll deadlock
against it.
|
| |
| |
| |
| |
| | |
Now that we have encoding strategies, we can just walk the params hash
once to encode as HWIA, and remove nils.
|
| |
| |
| |
| | |
we'll refactor deep munge mostly out of existence shortly
|
| |
| |
| |
| | |
This should have been done along with 8f8ccb9901cab457c6e1d52bdb25acf658fd5777
|
| |
| |
| |
| |
| | |
this just pushes the conditional in to the case / when so we can switch
to method dispatch later
|
| |
| |
| |
| |
| |
| |
| | |
there is no reason to `convert_hashes_to_parameters` with an assignemt
flag. The caller knows whether or not it wants the value assigned. We
should just change the uncommon case (not writing to the underlying
hash) to just call the conversion method and return that value.
|
| |
| |
| |
| |
| |
| | |
only hashes are converted to parameter objects, so lets add a branch for
them. This also removes a is_a? test for Parameters so we can be
abstracted from the class.
|
|\ \
| | |
| | | |
fix rails tests
|
|/ / |
|
|\ \
| | |
| | | |
Extra caller details added to ActiveRecord::RecordNotFound
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ActiveRecord::RecordNotFound modified to store model name, primary_key
and id of the caller model. It allows the catcher of this exception to make
a better decision to what to do with it. For example consider this simple
example:
class SomeAbstractController < ActionController::Base
rescue_from ActiveRecord::RecordNotFound, with: :redirect_to_404
private def redirect_to_404(e)
return redirect_to(posts_url) if e.model == 'Post'
raise
end
end
|
|\ \ \
| | | |
| | | | |
add system! to fail fast in bin/setup
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
remove `web-console` from API app generated Gemfile
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
repinel/rename-restrict-dependent-destroy-i18n-key
Deprecate the keys for association `restrict_dependent_destroy` errors in favor of new key names
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously `has_one` and `has_many` associations were using the
`one` and `many` keys respectively. Both of these keys have special
meaning in I18n (they are considered to be pluralizations) so by
renaming them to `has_one` and `has_many` we make the messages more
explicit and most importantly they don't clash with linguistical
systems that need to validate translation keys (and their
pluralizations).
The `:'restrict_dependent_destroy.one'` key should be replaced with
`:'restrict_dependent_destroy.has_one'`, and
`:'restrict_dependent_destroy.many'` with
`:'restrict_dependent_destroy.has_many'`.
[Roque Pinel & Christopher Dell]
|
|\ \ \ \
| | | | |
| | | | | |
Ensure that microsecond precision is only used for versions of mysql that support it.
|
| | | | |
| | | | |
| | | | |
| | | | | |
support it. Fixes #19711
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove unnecessary `dup` from Mapper `add_route`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The `dup` was introduced by c4106d0c08954b0761726e0015ec601b7bc7ea4b
to work around a frozen key. Nowadays, the string is already being
duplicated by the `tr` in `options[:action] ||= action.tr('-', '_')`
and later joined into a new string in `name_for_action`.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
titleizing the New Link
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix minor typo in testing guide [ci skip]
|
|/ / / / /
| | | | |
| | | | | |
[ci skip]
|
| | | | | |
|
|\ \ \ \ \ |
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This clears the transaction record state when the transaction finishes
with a `:committed` status.
Considering the following example where `name` is a required attribute.
Before we had `new_record?` returning `true` for a persisted record:
```ruby
author = Author.create! name: 'foo'
author.name = nil
author.save # => false
author.new_record? # => true
```
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As per the docs, `mark_for_destruction` should do nothing if `autosave`
is not set to true. We normally persist associations on a record no
matter what if the record is a new record, but we were always skipping
records which were `marked_for_destruction?`.
Fixes #20882
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add missing method name to exception description
|
| | |_|_|/
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
fix doc about ActiveRecord::Transactions::ClassMethods#transaction [ci skip]
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
grammar fix to content_for method documentation in capture_helper.rb [ci skip]
|