Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSCommerce doesn't use database transactions?


chunzhi

Recommended Posts

Hi, I am reading oscommerce source code. I found oscommerce uses MyISAM engine which doesn't support database transactions, and I didn't see any transaction inside the source code.

I'm wondering if oscommerce really doesn't use ACID transactions? If so, how to secure the system when there are failures during processing an order? How to control concurrency issues? (for example, 2 people put orders concurrently, may cause an item out-of-stock...)

 

Thanks...

Link to comment
Share on other sites

Hi Chunzhi..

 

The v2.x codebase was not developed with that in mind - there have however been no reports of this causing a problem for anyone.

 

Transactions are supported as a core feature in v3.0 (InnoDB) with a compatibility layer for MyISAM installations, in addition to also supporting PostgreSQL. This is in development though and is not recommended for production use until v3.1 is published.

 

Kind regards,

:heart:, osCommerce

Link to comment
Share on other sites

Hi Chunzhi..

 

The v2.x codebase was not developed with that in mind - there have however been no reports of this causing a problem for anyone.

 

Transactions are supported as a core feature in v3.0 (InnoDB) with a compatibility layer for MyISAM installations, in addition to also supporting PostgreSQL. This is in development though and is not recommended for production use until v3.1 is published.

 

Kind regards,

 

Hi Harald, I glanced at the v3.0 code. It seems transactions are only used for admin pages. However in the front end, the checkout process doesn't use transactions. So how to maintain the isolation and atomicity for customers' checkouts?

For example,

(1) if the system crashed between inserting the order and insert each product...

(2) if multiple users order together, it may still cause out-of-stock...

 

I'm wondering the system still need ACID semantics, so why don't osCommerce use transactions here?

Link to comment
Share on other sites

@@chunzhi

 

v3.0 is a developers release and not ready for production use. I believe that when Harald mentioned it, he was stating that WHEN a product version of 3.x is release it will then be supported.

 

 

 

Chris

Link to comment
Share on other sites

v2.3 was coded supporting MyISAM, which does not support transactions.

 

@@Harald Ponce de Leon

Thank you very much, and sorry to disturb you again. I know osCommerce v3 will move to InnoDB and other engines which support txns, but I'm wondering is it performance-acceptable to modify this heavy operation in frontend to transaction? How do you think about the balance between robustness and performance?

 

Sincerely,

Chunzhi

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...