OpenClovis / SAFplus-Availability-Scalability-Platform

Middleware that provides libraries, GUI, and code generator to design multi-node (clustered) applications that are highly available, redundant, and scalable. Provides sub-second node and application fault detection and failover, and useful application libraries including distributed hash tables (checkpoint), event, logging, and communications. Implements SA-Forum APIs where applicable. Used anywhere reliability is a must -- like telecom, wireless, defense and enterprise computing. Download stable release with installer from: ftp.openclovis.com
www.openclovis.com
GNU General Public License v2.0
20 stars 13 forks source link

saEvtEventPublish should return error if eventDataSize is too big #12

Closed hungta closed 11 years ago

hungta commented 12 years ago

Testing functionalities of SAFplus event service, it sometimes doesn't work. The steps that has been done:

  1. Event initialization success using function saEvtInitialize()
  2. Client subscribes the event
  3. Publish the event success using saEvtEventPublish() but eventId returned 0 and event is not delivered (subscriber doesn't receive the event).

For the entire code, please read the test package OpenClovis/ SAFplus-Test / mwComparison . The common.c file contains the common code worked for both SAFplus and OpenSAF.

CangTranOC commented 11 years ago

Change title to "saEvtEventPublish should return error if eventDataSize is too big"

saEvtEventPublish() return SA_AIS_OK with eventDataSize = 100000000, but there is no event received due to large data size. It should return an error (SA_AIS_ERR_TOO_BIG).

CangTranOC commented 11 years ago

Propose a solution:

Support extended definition

define CL_EVENT_DATA_MAX_SIZE 65536

And support check for data limitation SaAisErrorT saEvtEventPublish(SaEvtEventHandleT eventHandle, const void pEventData, SaSizeT eventDataSize, SaEvtEventIdT \ pEventId) { ........ if (CL_EVENT_DATA_MAX_SIZE < eventDataSize) { rc = SA_AIS_ERR_TOO_BIG; return rc; } ........ }

However, our current Event Service is implementing SA Forum AIS EVT APIs (SAI-AIS-B.01.00.09) that does not provides APIs to identify limits for a particular implementation of the Event Service. In SAI-AIS-EVT-B.03.01, there is an API saEvtLimitGet() to obtain the current implementation-specific value of an Event Service limit. The issue can be resolved when our Event Service is moved up to (B.03.01).