summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-06-16 07:09:44 +0000
committervzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-06-16 07:09:44 +0000
commit4aa76fe9ee999052aba487f029faa40b9988a64e (patch)
treebf1d604df6e25471603ad267ff8242bb68aef44e
parent3dcff57ddcf90b26d3f94c2b9db4a612948719cd (diff)
downloadATCD-4aa76fe9ee999052aba487f029faa40b9988a64e.tar.gz
ChangeLogTag: Tue Jun 16 07:06:14 UTC 2009 Vladimir Zykov <vz@prismtech.com>
-rw-r--r--TAO/ChangeLog26
-rw-r--r--TAO/tao/Leader_Follower_Flushing_Strategy.cpp26
-rw-r--r--TAO/tao/Messaging/Messaging_Policy_i.cpp3
-rw-r--r--TAO/tao/ORB_Core.cpp11
-rw-r--r--TAO/tao/ORB_Core.h13
-rw-r--r--TAO/tao/Transport.cpp12
-rw-r--r--TAO/tests/Big_AMI/client.cpp8
-rw-r--r--TAO/tests/Bug_1270_Regression/Echo.cpp2
-rw-r--r--TAO/tests/Bug_1270_Regression/client.cpp25
-rw-r--r--TAO/tests/Bug_1270_Regression/server.cpp22
-rw-r--r--TAO/tests/Bug_1476_Test/test.ior2
-rw-r--r--TAO/tests/Crash_On_Write/Crash_Task.cpp3
-rw-r--r--TAO/tests/Portable_Interceptors/AMI/client.cpp8
13 files changed, 76 insertions, 85 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 9d6189508f3..cd208cc18cb 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,21 @@
+Tue Jun 16 07:06:14 UTC 2009 Vladimir Zykov <vz@prismtech.com>
+
+ * tests/Big_AMI/client.cpp:
+ * tests/Crash_On_Write/Crash_Task.cpp:
+ * tests/Portable_Interceptors/AMI/client.cpp:
+ * tests/Bug_1270_Regression/client.cpp:
+ * tests/Bug_1270_Regression/Echo.cpp:
+ * tests/Bug_1270_Regression/server.cpp:
+ * tests/Bug_1476_Test/test.ior:
+ * tao/ORB_Core.cpp:
+ * tao/Leader_Follower_Flushing_Strategy.cpp:
+ * tao/Messaging/Messaging_Policy_i.cpp:
+ * tao/ORB_Core.h:
+ * tao/Transport.cpp:
+
+ Reverted all my changes for Bug#3682 and Bug#3697. They need
+ more investigation.
+
Mon Jun 15 19:45:30 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
* tao/IIOP_Connection_Handler.cpp:
@@ -5,9 +23,9 @@ Mon Jun 15 19:45:30 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
Change the initialization of the bidir listen point received in
the context. This will silence an error that is reported by the
ACE_INET_Addr ctor regardless of the debug output level.
-
+
* tests/BiDirectional/run_test3557.pl:
-
+
Change the number of iterations sent by the server to the
callback. This is necessary to avoid a problem on windows in
which the TAO_IIOP_Endpoint::hash() method first calls its
@@ -17,13 +35,13 @@ Mon Jun 15 19:45:30 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
as is the point of this test, windows apparently takes a while
to time out before actually completing invocation and passing
the test.
-
+
This actually points out a potentential failure in the transport
cache in that recached bidir transports may end up using a hash
key value of 0. This is not in itself a failure, but more than
one such entry will cause that 0'th bucket to become
disproportionally large.
-
+
Mon Jun 15 18:41:04 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp:
diff --git a/TAO/tao/Leader_Follower_Flushing_Strategy.cpp b/TAO/tao/Leader_Follower_Flushing_Strategy.cpp
index 3e34fc526c9..03dedc5764e 100644
--- a/TAO/tao/Leader_Follower_Flushing_Strategy.cpp
+++ b/TAO/tao/Leader_Follower_Flushing_Strategy.cpp
@@ -47,31 +47,7 @@ TAO_Leader_Follower_Flushing_Strategy::flush_transport (
{
TAO_ORB_Core * const orb_core = transport->orb_core ();
- if (max_wait_time == 0)
- {
- // In case max_wait_time==0 we run a while loop depending on
- // both transport->queue_is_empty() and reactor->work_pending()
- // to make sure that we both dispatch all the messages in the
- // transport's queue and at the same time those that we scheduled
- // in the reactor but not more then that. However it doesn't
- // make sense to check only for transport->queue_is_empty()
- // since in multi-threaded application it can easily happen
- // that the other thread will run the orb and drain the
- // queue in the transport we're coping with here. So, that
- // transport->queue_is_empty () will return false but before
- // we get a chance to run the orb the queue in the transport
- // will become empty and we will wait forever. Instead while
- // loop depending on reactor->work_pending () is much safer
- // since transport will return 0 (letting the reactor know
- // about more pending work) when handling output/timeout as
- // long as its queue is not empty.
- while (!transport->queue_is_empty () &&
- orb_core->orb ()->work_pending ())
- {
- orb_core->orb ()->perform_work ();
- }
- }
- else
+ while (!transport->queue_is_empty ())
{
if (orb_core->run (max_wait_time, 1) == -1)
return -1;
diff --git a/TAO/tao/Messaging/Messaging_Policy_i.cpp b/TAO/tao/Messaging/Messaging_Policy_i.cpp
index 6a8ea3a75bb..0de73d151a9 100644
--- a/TAO/tao/Messaging/Messaging_Policy_i.cpp
+++ b/TAO/tao/Messaging/Messaging_Policy_i.cpp
@@ -235,8 +235,7 @@ TAO_Sync_Scope_Policy::hook (TAO_ORB_Core *orb_core,
if (CORBA::is_nil (policy.in ()))
{
- has_synchronization = true;
- scope = Messaging::SYNC_WITH_TRANSPORT;
+ has_synchronization = false;
return;
}
Messaging::SyncScopePolicy_var p =
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 7130325aa13..658135a32b8 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -294,7 +294,6 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid,
ACE_NEW (this->request_dispatcher_,
TAO_Request_Dispatcher);
- this->set_sync_scope_hook (TAO_ORB_Core::default_sync_scope_hook);
}
TAO_ORB_Core::~TAO_ORB_Core (void)
@@ -2926,16 +2925,6 @@ TAO_ORB_Core::implrepo_service (void)
}
void
-TAO_ORB_Core::default_sync_scope_hook (TAO_ORB_Core *,
- TAO_Stub *,
- bool &has_synchronization,
- Messaging::SyncScope &scope)
-{
- has_synchronization = true;
- scope = Messaging::SYNC_WITH_TRANSPORT;
-}
-
-void
TAO_ORB_Core::call_sync_scope_hook (TAO_Stub *stub,
bool &has_synchronization,
Messaging::SyncScope &scope)
diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h
index 42c2e3b296a..13d561541b6 100644
--- a/TAO/tao/ORB_Core.h
+++ b/TAO/tao/ORB_Core.h
@@ -537,12 +537,6 @@ public:
void set_sync_scope_hook (Sync_Scope_Hook hook);
- /// Default Sync_Scope_Hook.
- static void default_sync_scope_hook (TAO_ORB_Core *,
- TAO_Stub *,
- bool &has_synchronization,
- Messaging::SyncScope &scope);
-
/// Handle to the factory for protocols_hooks_..
TAO_Protocols_Hooks *protocols_hooks_;
@@ -876,6 +870,10 @@ public:
/// Choose to be not a default ORB when there is more than one ORB.
void not_default (const char * orb_id);
+ /// This strategy is the default, no explicit queueing and no explicit
+ /// flush
+ TAO::Transport_Queueing_Strategy *default_transport_queueing_strategy (void);
+
/// Verify condition for permanent forward is given,
/// both parameters must provide group attributes.
CORBA::Boolean is_permanent_forward_condition
@@ -1187,6 +1185,9 @@ protected:
#endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
+ /// This strategy will not queue by default and not flush
+ TAO::Transport_Queueing_Strategy *default_transport_queueing_strategy_;
+
/// Number of outstanding references to this object.
ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 25e196e2a0a..ea6e73f1382 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -225,7 +225,7 @@ TAO_Transport::~TAO_Transport (void)
// The following assert is needed for the test "Bug_2494_Regression".
// See the bugzilla bug #2494 for details.
- ACE_ASSERT (this->queue_is_empty_i ());
+ ACE_ASSERT (this->head_ == 0);
ACE_ASSERT (this->cache_map_entry_ == 0);
#if TAO_HAS_TRANSPORT_CURRENT == 1
@@ -1020,7 +1020,7 @@ TAO_Transport::drain_queue_helper (int &iovcnt, iovec iov[],
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - Transport[%d]::drain_queue_helper, ")
ACE_TEXT ("byte_count = %d, head_is_empty = %d\n"),
- this->id(), byte_count, this->queue_is_empty_i ()));
+ this->id(), byte_count, (this->head_ == 0)));
}
return 1;
@@ -1121,7 +1121,7 @@ TAO_Transport::drain_queue_i (TAO::Transport::Drain_Constraints const & dc)
}
}
- if (this->queue_is_empty_i ())
+ if (this->head_ == 0)
{
if (this->flush_timer_pending ())
{
@@ -1152,7 +1152,7 @@ TAO_Transport::cleanup_queue_i ()
int msg_count = 0;
// Cleanup all messages
- while (!this->queue_is_empty_i ())
+ while (this->head_ != 0)
{
TAO_Queued_Message *i = this->head_;
@@ -1183,7 +1183,7 @@ TAO_Transport::cleanup_queue_i ()
void
TAO_Transport::cleanup_queue (size_t byte_count)
{
- while (!this->queue_is_empty_i () && byte_count > 0)
+ while (this->head_ != 0 && byte_count > 0)
{
TAO_Queued_Message *i = this->head_;
@@ -1363,7 +1363,7 @@ TAO_Transport::send_asynchronous_message_i (TAO_Stub *stub,
// to send first:
bool try_sending_first = true;
- bool const queue_empty = this->queue_is_empty_i ();
+ bool const queue_empty = (this->head_ == 0);
TAO::Transport_Queueing_Strategy *queue_strategy =
stub->transport_queueing_strategy ();
diff --git a/TAO/tests/Big_AMI/client.cpp b/TAO/tests/Big_AMI/client.cpp
index 990354339ff..ac7a4292842 100644
--- a/TAO/tests/Big_AMI/client.cpp
+++ b/TAO/tests/Big_AMI/client.cpp
@@ -190,6 +190,14 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
payload);
}
+ // We are just sending all requests, but we shouldn't get any replies
+ // until we run the orb or do a real synchronous call, so check whether
+ // we didn't get any reply until this moment
+ if (handler.reply_count () > 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Got a reply during sending asynchronous calls\n"),
+ 1);
+
if (debug)
{
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/tests/Bug_1270_Regression/Echo.cpp b/TAO/tests/Bug_1270_Regression/Echo.cpp
index 7c548962e89..d9c971f82e3 100644
--- a/TAO/tests/Bug_1270_Regression/Echo.cpp
+++ b/TAO/tests/Bug_1270_Regression/Echo.cpp
@@ -36,6 +36,6 @@ Echo::echo_payload(Test::Payload const &)
ACE_DEBUG ((LM_DEBUG, "(%P|%t) Echo::echo_payload, aborting\n"));
// Kill the app
- ACE::terminate_process (ACE_OS::getpid ());
+ ACE_OS::abort();
}
}
diff --git a/TAO/tests/Bug_1270_Regression/client.cpp b/TAO/tests/Bug_1270_Regression/client.cpp
index 39e4d8ab5d5..e58db268837 100644
--- a/TAO/tests/Bug_1270_Regression/client.cpp
+++ b/TAO/tests/Bug_1270_Regression/client.cpp
@@ -37,6 +37,29 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
+ CORBA::Object_var object =
+ orb->resolve_initial_references ("PolicyCurrent");
+
+ CORBA::PolicyCurrent_var policy_current =
+ CORBA::PolicyCurrent::_narrow (object.in ());
+
+ if (CORBA::is_nil (policy_current.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
+ return 1;
+ }
+ CORBA::Any scope_as_any;
+ scope_as_any <<= Messaging::SYNC_WITH_TRANSPORT;
+
+ CORBA::PolicyList policies(1); policies.length (1);
+ policies[0] =
+ orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
+ scope_as_any);
+
+ policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE);
+
+ policies[0]->destroy ();
+
if (parse_args (argc, argv) != 0)
return 1;
@@ -90,7 +113,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
catch (const CORBA::Exception& ex)
{
- ex._tao_print_exception ("Exception caught in client:");
+ ex._tao_print_exception ("Exception caught:");
return 1;
}
diff --git a/TAO/tests/Bug_1270_Regression/server.cpp b/TAO/tests/Bug_1270_Regression/server.cpp
index 36b26f22b52..fdacca6ce3d 100644
--- a/TAO/tests/Bug_1270_Regression/server.cpp
+++ b/TAO/tests/Bug_1270_Regression/server.cpp
@@ -38,26 +38,6 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
CORBA::Object_var object =
orb->resolve_initial_references ("PolicyCurrent");
- CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in ());
-
- if (CORBA::is_nil (policy_current.in ()))
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Nil policy current\n"));
- return 1;
- }
- CORBA::Any scope_as_any;
- scope_as_any <<= Messaging::SYNC_NONE;
-
- CORBA::PolicyList policies(1); policies.length (1);
- policies[0] =
- orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any);
-
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE);
-
- policies[0]->destroy ();
-
if (parse_args (argc, argv) != 0)
return 1;
@@ -107,7 +87,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
catch (const CORBA::Exception& ex)
{
- ex._tao_print_exception ("Exception caught in server:");
+ ex._tao_print_exception ("Exception caught:");
return 1;
}
diff --git a/TAO/tests/Bug_1476_Test/test.ior b/TAO/tests/Bug_1476_Test/test.ior
index 87ddb529545..da5b17a72c7 100644
--- a/TAO/tests/Bug_1476_Test/test.ior
+++ b/TAO/tests/Bug_1476_Test/test.ior
@@ -1 +1 @@
-IOR:000000000000001349444c3a546573742f48656c6c6f3a312e30000000000001000000000000006c000102000000000b676f6f676c652e636f6d0000c12000000000001b14010f005253544a3268540002a34f000000000000000100000001000000000200000000000000080000000054414f000000000100000018000000000001000100000001050100010001010900000000
+IOR:010000001300000049444c3a546573742f48656c6c6f3a312e300000010000000000000068000000010102000a0000006c6f63616c686f73740006ca1b00000014010f00525354f744f744d10502000000000001000000010000000002000000000000000800000001000000004f41540100000018000000010000000100010001000000010001050901010000000000 \ No newline at end of file
diff --git a/TAO/tests/Crash_On_Write/Crash_Task.cpp b/TAO/tests/Crash_On_Write/Crash_Task.cpp
index 1c3528b7a99..6b6e9c7d896 100644
--- a/TAO/tests/Crash_On_Write/Crash_Task.cpp
+++ b/TAO/tests/Crash_On_Write/Crash_Task.cpp
@@ -20,8 +20,7 @@ Crash_Task::svc (void)
ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting crash task\n"));
ACE_OS::sleep (this->running_time_);
ACE_DEBUG ((LM_DEBUG, "(%P|%t) Sleep done, crashing the server\n"));
- ACE_DEBUG ((LM_DEBUG, "Aborting\n"));
- ACE::terminate_process (ACE_OS::getpid ());
+ ACE_DEBUG ((LM_DEBUG, "%a"));
return 0;
}
diff --git a/TAO/tests/Portable_Interceptors/AMI/client.cpp b/TAO/tests/Portable_Interceptors/AMI/client.cpp
index 51fe346a2c9..dec2ca68b50 100644
--- a/TAO/tests/Portable_Interceptors/AMI/client.cpp
+++ b/TAO/tests/Portable_Interceptors/AMI/client.cpp
@@ -195,8 +195,6 @@ test_ami (CORBA::ORB_ptr orb,
unsigned long initial_request_count =
Echo_Client_Request_Interceptor::request_count;
- unsigned long initial_reply_count =
- Echo_Client_Request_Interceptor::reply_count;
unsigned long initial_other_count =
Echo_Client_Request_Interceptor::other_count;
@@ -208,8 +206,7 @@ test_ami (CORBA::ORB_ptr orb,
}
unsigned long total_request_count =
- Echo_Client_Request_Interceptor::request_count -
- (Echo_Client_Request_Interceptor::reply_count + initial_request_count);
+ Echo_Client_Request_Interceptor::request_count - initial_request_count;
unsigned long total_other_count =
Echo_Client_Request_Interceptor::other_count - initial_other_count;
@@ -224,7 +221,8 @@ test_ami (CORBA::ORB_ptr orb,
}
initial_request_count =
- Echo_Client_Request_Interceptor::request_count -
+ Echo_Client_Request_Interceptor::request_count;
+ unsigned long initial_reply_count =
Echo_Client_Request_Interceptor::reply_count;
while (echo_handler_impl->replies () != ITERATIONS)