new XPA and Actian gateway


magic9@aquari.com
 

Hello,
Does anyone know if there is a new gateway for Actian Zen (Pervasive) with the newest version of Magic?
I tried to create a file with about 2 billion records with 9.4 and Actian 14 and it did not work.
I was told (by Bill at Goldstar) that the only work around is for Magic to make a new gateway for Actian.
So did Magic ever release another gateway for Actian (Pervasive) after 9.4?
Thanks
Andy


David
 

Hi

As far as I know they did with XPA 4.9 but it's buggy at my latest informations. (don't hang me up)

The previous Gateway XPA 4.8 and lower works.

I have an installation with 8.3 running on Actian Zen 14, why i'm suprised that 9.4 can't... what failed?


Steven Blank
 

Andy,

Magic's Btrieve ISAM gateway hasn't been substantially modified since at least v9.4. AFAIK, the last real modification happened sometime in v9, to finally squash an abandoned record lock bug first identified with Magic's implementation of the Btrieve API's GetExtended() operation in v7. (You might recall hearing me chatter from decade to decade about adding "/EXTENDED=N" to the Btrieve DBMS Properties column.) That the Btrieve ISAM Gateway has not been significantly altered since way, WAY back is true, again AFAIK, all the way up to and including the Btrieve ISAM Gateway installed with Magic xpa v4.8.x. With the general release of Magic xpa v4.9, however, MSE are now shipping a brand spanking new ISAM gateway as well, and installed in addition to the legacy Btrieve ISAM Gateway. This new ISAM gateway implements Actian Zen's new Btrieve 2 API. 

Indeed a HUGE step forward, the Btrieve 2 API gateway is a version-one product with some known issues. For one, it appears to be flat-out incompatible with Zen 15's Btrieve 2 API — MSE supports the gateway with v14 only so far, but I expect they'll all get sorted out in ensuing service packs. If you opt to install the Btrieve ISAM Gateway with v4.9, you actually get two gateway DLLs, the original Btrieve gateway, now RE-named MGBtrieveAPI1.dll; and the new gateway which inherited the original gateway's file name MGBtrieve.dll.

The previous Pervasive SQL gateway remains unchanged.

Regarding the failure with "about 2 billion records" — how did it fail? What was the error message? Could be as simple as disk full, or unique index overflow (does "about 2 billion records" just happen to be exactly 2,147,483,648 (the limit for a four-byte, signed integer)?

Steven G. Blank
Ξ SGBlank Consulting


On 3/2/2023 9:15 AM, magic9@... wrote:

Hello,
Does anyone know if there is a new gateway for Actian Zen (Pervasive) with the newest version of Magic?
I tried to create a file with about 2 billion records with 9.4 and Actian 14 and it did not work.
I was told (by Bill at Goldstar) that the only work around is for Magic to make a new gateway for Actian.
So did Magic ever release another gateway for Actian (Pervasive) after 9.4?
Thanks
Andy


magic9@aquari.com
 

David, Steven,
Thanks for your replies.
If my memory serves me right, it was an index issue.
I just started to recreate the table with 9.4 and Actian 14 to get the exact error, and I will post it here when it crashes.
Did I understand correctly that if I were to use XPA 4.9 with the new gateway(s) that it would work?
Thanks
Andy


Steven Blank
 

Andy,

You wrote "Did I understand correctly that if I were to use XPA 4.9 with the new gateway(s) that it would work?"

No, that's not what I said.

What I said was, the new gateway works with Actian Zen 14 with some known issues. I also said that the legacy gateway also installed with v4.9 most certainly works the same as it has since the prior millennium.

But, it sounds to me like you've concluded that you must have the Btrieve 2 API gateway in order to create a file having more than "about 2 billion records." Is that true?

There are many, many possibilities, the majority of which have nothing whatsoever to do with which API is used to talk to the MKDE.

Steven G. Blank
Ξ SGBlank Consulting


On 3/4/2023 6:48 AM, magic9@... wrote:

David, Steven,
Thanks for your replies.
If my memory serves me right, it was an index issue.
I just started to recreate the table with 9.4 and Actian 14 to get the exact error, and I will post it here when it crashes.
Did I understand correctly that if I were to use XPA 4.9 with the new gateway(s) that it would work?
Thanks
Andy


magic9@aquari.com
 

Steve,

After running the program for a week (in 9.4 using Actian Zen 14) to combine the data files into one file, it crashed with File manager fatal error 132 (The file has reached its size limit).
The file has 540,764,583 records in it, which is about a quarter of the total data in need to load. According to Windows 10, the file is 268,416,352 KB (391 GB).

So where do I go from here?
If I were to use the new XPA and the new gateways would it get past this error?

By the way, a similar procedure took me about an hour to load the data to a MongoDB table/collection.
Does anyone know if the ODBC gateway from 9.4 will connect to MongoDB?

Thanks
Andy


Steven Blank
 

Andy,

From the Zen Control Center Help:
132: The file has reached its size limit
The MicroKernel returns this status code in one of the following situations:
• The file reached its maximum size. This limit depends on the file version, the page size, and the number of records per page. [emphasis added] See File Size in Advanced Operations Guide for a complete discussion.
• An operation attempted to allocate more than the maximum number of page allowed for a data file.
• A data file has been in continuous operation for a long period of time, and its delta file exceeds 4 GB.
• A single data file segment has reached the operating system file size limit.
end quote

If you'd like, open a command prompt, change to the location where the "[data] file [that] has reached its size limit," lives, execute BUTIL -STAT on the file, and include the file's statistics (page size, record length, number of indexes, etc.)  in your reply.

No, this error has nothing whatsoever with the API used to communicate with the MKDE. The MKDE alone handles the disk files and it's the MKDE who's unhappy.

As to why this process might take days instead of hours ... to answer that question, I'd need to see the application. It might be as simple as changing a Link Write operation to a Link Create. Or not.

As to whether or not Magic's ODBC gateway will connect to MongoDB, that depends entirely on whether or not proper, ODBC-compliant drivers exist for MongoDB and are installed; it does not depend on Magic's ODBC gateway. MSE provide an ODBC Driver Test utility (mgchkdrv.exe) to check for proper ODBC-compliance.

Steven G. Blank
Ξ SGBlank Consulting


On 3/11/2023 3:37 PM, magic9@... wrote:

Steve,

After running the program for a week (in 9.4 using Actian Zen 14) to combine the data files into one file, it crashed with File manager fatal error 132 (The file has reached its size limit).
The file has 540,764,583 records in it, which is about a quarter of the total data in need to load. According to Windows 10, the file is 268,416,352 KB (391 GB).

So where do I go from here?
If I were to use the new XPA and the new gateways would it get past this error?

By the way, a similar procedure took me about an hour to load the data to a MongoDB table/collection.
Does anyone know if the ODBC gateway from 9.4 will connect to MongoDB?

Thanks
Andy



magic9@aquari.com
 

Steve,

Page compression is set to on, record compression is set to off, and the page size is set to the maximum, which is 16384. System data remains the default, Add/Retain System Key (DataExchange Setting).
These file settings were recommended by Bill after some discussion years ago.
The page compression reduced performance a bit but also dramatically reduced the file size. Before these settings were implemented the file sizes were too large and unmanageable.
Encrypt table and an access key is also specified in the file properties.
 
The program that creates the file (and which took a week to run) is a simple batch program that reads 1 file with the file settings set to read, share non and no cache, 
and link creates each record to another file with write, share none and no cache.
There are 10 batch files like this that are called sequentially. Each reads a file that has about 100 million records.
The new file that is created has 4 indexes.

Thanks
Andy


John Knickerbocker
 

Setting the open mode to reindex on the new file will make it run faster, by a lot. 


On Sun, Mar 12, 2023, 3:24 PM magic9@... <magic9@...> wrote:
Steve,

Page compression is set to on, record compression is set to off, and the page size is set to the maximum, which is 16384. System data remains the default, Add/Retain System Key (DataExchange Setting).
These file settings were recommended by Bill after some discussion years ago.
The page compression reduced performance a bit but also dramatically reduced the file size. Before these settings were implemented the file sizes were too large and unmanageable.
Encrypt table and an access key is also specified in the file properties.
 
The program that creates the file (and which took a week to run) is a simple batch program that reads 1 file with the file settings set to read, share non and no cache, 
and link creates each record to another file with write, share none and no cache.
There are 10 batch files like this that are called sequentially. Each reads a file that has about 100 million records.
The new file that is created has 4 indexes.

Thanks
Andy


magic9@aquari.com
 

Thank you John, I will try that setting.


magic9@aquari.com
 

Steve,
The advanced operations guide I have dates back to 2002, is there a new one?
Can anyone provide me with the most recent PDF of the Magic Advanced Operation Guide?
Thanks
Andy


On Sat, Mar 11, 2023 at 05:30 PM, Steven Blank wrote:
Advanced Operations Guide


Steven Blank
 

AFAIK, Actian doesn't publish PDF documentation anymore, at least I can't find anything. The Advanced Operations Guide is part of Zen's online help, accessed through the Zen Control Center:



Steven G. Blank
Ξ SGBlank Consulting


On 3/18/2023 4:23 PM, magic9@... wrote:

Steve,
The advanced operations guide I have dates back to 2002, is there a new one?
Can anyone provide me with the most recent PDF of the Magic Advanced Operation Guide?
Thanks
Andy

On Sat, Mar 11, 2023 at 05:30 PM, Steven Blank wrote:
Advanced Operations Guide


magic9@aquari.com
 
Edited

Hello all,
I reached out to Bill Bach about this and below is his response.
Please let me know what you think of this.
Thanks
Andy

Bill's response:
While the Actian Zen v13.30 and newer engines support files up to 64TB and billions of records with ease (I have personally tested it to 600GB and over 4.5B rows), your limiting factor in this case is your development environment -- Magic itself. 

The Magic Gateway included with the older versions of Magic simply cannot handle files with more than 256GB of data (which can be less than this when compressed) or 4 billion rows.  (Not even sure if it will handle more than 2B rows.)  The latest release from January (v4.9?) does include a new Magic Gateway available that purports to support this new file format capability -- but the initial release is buggy.  Apparently, if you have any descending keys, the new Gateway chokes on it.  This issue is already known to Magic (for at least 2 months) and at last check (about a week ago), they confirmed that it is not yet fixed.

So, the magic formula (pun intended) is thus:
- Actian PSQL v13.30 or higher is required.  Zen v14/v15 recommended.
- Data file must be converted to the v13 file format.  Note that doing this on v15.10 will result in changes to the file such that it cannot be used on v15.01 or older.  As such, if you need to support older versions, you should avoid v15.10 or newer for now.
- Magic v4.9 or higher is required, and you must use the new Magic Gateway provided in this release.  Again, watch out for descending keys, which can crash it.  We don't know what other bugs may be present in this brand-new release.
- The Limit File Size configuration option inside the database engine must be unchecked.  This limit is there to prevent users NOT YET using the new Gateway from inserting more data than the application can handle.  If you leave this checked, then the engine will still return the 132 when you hit 256GB.  If you uncheck it and are still using the older Gateway, extended calls to the file will start failing, and your application will likely fail in some spectacular fashion.

If you can get to ALL of those, then you can make the file larger.  Alternatively, I could add that if you eschew the direct Magic access and instead use ODBC access ONLY for that file, then this becomes:
- Actian PSQL v13.30 or higher is required.  Zen v14/v15 recommended.
- Data file must be converted to the v13 file format.  Note that doing this on v15.10 will result in changes to the file such that it cannot be used on v15.01 or older.  As such, if you need to support older versions, you should avoid v15.10 or newer for now.
- Magic ODBC Access Only is required -- you cannot use the Magic Gateway to access this file directly. 
- The Limit File Size configuration option inside the database engine must be unchecked.  This limit is there to prevent users NOT YET using the new Gateway from inserting more data than the application can handle.  If you leave this checked, then the engine will still return the 132 when you hit 256GB.  If you uncheck it and are still using the older Gateway, extended calls to the file will start failing, and your application will likely fail in some spectacular fashion.

The Limit File Size configuration option inside the database engine must be unchecked: This setting was added to v15.  With v14, there is no such protection -- if you create a v13 file and then exceed the file size limits of the older BTRV function (and the older Magic Gateway), then your application will simply break without warning.  Actian added the extra switch to v15 after I pointed out this dangerous situation with v14.

The last response I have on the bug report is from Yuval Asheri <yuval_asheri@...> on March 12, who indicated it was still an open issue.