Displaying 20 results from an estimated 1001 matches for "optimistically".
2006 Apr 11
1
Implementing Optimistic Offline Lock - How ?
I understand that ActiveRecord supports the "optimistic offline
lock"-pattern through magic fields (created_at, updated_at). However, a
scaffolded CRUD-Controller doesn''t generate the necessary code to
support this feature (the model state gets lost between two action
calls).
What is the best practice to prevent users from overwriting objects with
outdated data ?
--
2009 Dec 17
2
RFC: conflict_warnings plugin
Greetings,
I was hoping to get some feedback on a plugin I wrote.
The plugin is called conflict_warnings and is currently available from
my github repository at http://github.com/EmFi/conflict_warnings
The purpose of the plugin is to provide a simple methods of preventing
data inconsistencies that could arise from multiple users interacting
with the same resource.
Under basic operation a
2010 Jun 08
1
[PATCH] Fix optimistic locking during vm migration
Signed-off-by: Loiseleur Michel <mloiseleur at linagora.com>
---
src/db-omatic/db_omatic.rb | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb
index da11bfa..79f29d2 100755
--- a/src/db-omatic/db_omatic.rb
+++ b/src/db-omatic/db_omatic.rb
@@ -195,6 +195,9 @@ class DbOmatic < Qmf::ConsoleHandler
end
2006 May 09
7
When to use optimistic locking?
Hi All,
I''m having some trouble deciding when and how to implement optimistic
locking.
Let''s say I have a multiuser Rails app, and let''s say it stores,
among other things "vital" customer information.
The standard methods created by the Rails generate scaffold script
look like this:
def edit
@customer = Customer.find(params[:id])
end
2009 May 19
4
proper way to ensure atomic model changes
Hi!
Say we have a rails active-record-based model called "instance" which
can have different states - STOPPED, RUNNING, STARTING_UP,
SHUTTING_DOWN, etc...
There is a method #start which changes the instance state to
STARTING_UP only if it is STOPPED.
def start
if self.state == STOPPED
self.state = STARTING_UP
self.save
...
end
end
As you understand if we have multiple
2008 Aug 22
0
[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
In the general case, I think you have to be conservative about this
because programmers may deliberately want this kind of "wraparound"
behavior, e.g., with periodic boundary conditions. But 99.9% of
programs probably don't need that so it would be bad to penalize them
for this corner case. In such a situation, I think you just have to
support both choices, but choose the
2012 Jun 15
1
help in sentDetect() fuction
hello,
I am using the following code
>s<-"I am very happy, excited, and optimistic.I am very scared, annoyed, and
irritated.Iraq?s political crisis entered its second week one step closer to
the potential.dissolution of the government, with a call for elections by a
vital coalition partner and a suicide attack that extended the spate of
violence. that has followed the withdrawal.of
2006 Jan 04
2
Rename lock_version field?
Hi,
Is there a way to tell Rails that the magic field name for optimistic
database locking is not lock_version? I have a legacy database where the
optimistic locking field is named "version".
Thanks,
Phil
--
Posted via http://www.ruby-forum.com/.
2013 Feb 26
0
Feedback Needed: Optimistic Locking Destroy Bug
Need feedback on what I think is a bug in AR related to destroying models
with optimistic locking.
Please check this PR for more
information: https://github.com/rails/rails/pull/9448
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
2007 Mar 25
1
Optimistic locking and update_attributes: not working?
Hi all,
I''ve searched the forumns, but I can''t seem to find an answer to this
one. I''m having trouble getting optimistic locking (OL) to work in my
app, even though all of the pieces are there:
* table has lock_version column, with default of 0 (zero)
* lock_version column is being incremented by the first update (but the
second doesn''t catch it)
*
2014 Jul 08
1
arguments to .Call(), .External should be read-only?
...utine called via .Call() or .External() should considered read-only.
section 5.2, "Interface functions .C and .Fortran", says
----
However, when character vectors are used other than in a read-only way,
the .Call interface is much to be preferred.
----
which sort of implies (if one reads optimistically) that using .Call()
(by extension, again optimistically, .External()) one could treat
*character* vectors (and, again, optimistically, numeric, etc., vectors)
in a non-read-only way.
on the other (pessimistic) hand, section 5.9, "Handling R objects in C",
says
----
Neither .Call nor .Ext...
2018 Aug 23
2
[RFC] "Properly" Derive Function/Argument/Parameter Attributes
...e-nonnull-arg-prop %s | FileCheck %s
; In the following SCC, one function (scc_bottom_vs_top_fn_top) cannot be
; marked nonnull. We should still mark the others as they will always return
; nonnull pointers. However, this only works if we initialize our abstract
; state with bottom (not top), thus optimistically assume nonnull until proven
; otherwise.
declare nonnull i8* @ret_nonnull()
; CHECK: define i8* @scc_bottom_vs_top_fn_top
define i8* @scc_bottom_vs_top_fn_top() {
call i8* @scc_bottom_vs_top_fn_scc0()
call i8* @scc_bottom_vs_top_fn_scc1()
ret i8* null
}
; CHECK: define nonnull i8* @scc_bot...
2013 Feb 25
7
Optimistic Locking Enhancements: Gem or Core?
I''m working on an app that makes use of rails'' optimistic locking feature
and seeing some possibilities for improvements. It seems a bit tedious to
have to add :lock_version to forms wherever the model is used. You also
have to "hack" around rails'' UJS feature to add it as a URL parameter when
using remote: true, method: [:put, :patch, :post, :delete].
2009 Aug 10
1
[PATCH server] Fixed db-omatic so it doesn't die due to an unhandled ActiveRecord::StaleObjectError exception.
The error is caused by the save! method updating an object that another
thread (most likely in taskomatic) already updated.
In the case of this race condition, we retry saving. However, a proper fix
would involve fixing the locking.
---
src/db-omatic/db_omatic.rb | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/db-omatic/db_omatic.rb
2008 Aug 22
5
[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
>However, there is one issue I have ignored - possibility of overflow in
>the index expression. Suppose, we have such a loop:
> for (i8 i = 0; i != 200; ++i) {
> A[2 * i + 5] = ...
> ... = A[2 * i + 3]
> }
>If both index expressions are evaluated in 8-bit arithmetic,
>then the dependence equation should be solved in modular arithmetic:
> 2 * i + 5 == 2 * (i +
2009 Aug 10
0
[PATCH server] Fixed db-omatic so it doesn't die due to unhandled exceptions related to saving db objects in update_host_state and update_domain_state.
The underlying issue has to do with optimistic locking for active record,
and contention between db-omatic and task-omatic. That still needs to be
fixed, especially since contention issues might get worse when the two
daemons are made multithreaded.
---
src/db-omatic/db_omatic.rb | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git
2006 May 17
6
ActiveRecord#to_param
Hello,
to implement some some kind of optimistic locking, I want to build a
view, where an object is displayed together with a link containing the
data of the displayed object. My first try looked something like
<%= object.object_discription %>
<%= link_to "action", :action => "take_action", :data => object %>
this won''t work because object is of
2000 Nov 18
5
Sample still has horrorible distortions... anyone know why?
Hi,
I am subscribed to this list, and have learned a lot just from the discussions i see although i don't reply to the msgs, simply coz i'm no big deal programmer.
I feel, though, that as i'm really optimistic about vorbis and want it to grow and start to have more and more people using it, i feel that i should warn you about a bug the encoder have (i'm sure monty receives loads
2005 May 25
2
[LLVMdev] llc -march=ia64 support
Hi,
For the PyPy project ( http://codespeak.net/pypy ) I am working on the
x64-64 support.
I would like to use llc -march=ia64 to generate the assembly but that is
not supported at the moment.
As a workaround I let llc generate C code that gets compiled, but this
unfortunately is not a good way
to show the power of llvm. A understood this ia64 support will be worked
on soon.
First week of july
2009 Nov 24
6
[LLVMdev] New 8bit micro controller back-end
On Monday 23 November 2009 09:01, Anton Korobeynikov wrote:
> Hello
>
> > It is a RISC with around 60 instructions like a 80c51 instruction set
> > (without mul/div) and with Direct or indirect memory acces.
>
> My estimate is something like a man-week for a person, who knows what to do
> :)
That's pretty optimistic, even for someone who knows what to do.
The