Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

To iterate is human, to recurse, divine. -- Robert Heller


devel / comp.lang.xharbour / Indexing with MT

SubjectAuthor
* Indexing with MTCV
`* Re: Indexing with MTdlzc
 `* Re: Indexing with MTElla Stern
  `* Re: Indexing with MTCV
   `* Re: Indexing with MTElla Stern
    `* Re: Indexing with MTCV
     `* Re: Indexing with MTDaniele
      +- Re: Indexing with MTCV
      `* Re: Indexing with MTCV
       `* Re: Indexing with MTDaniele
        `* Re: Indexing with MTCV
         `* Re: Indexing with MTCV
          `* Re: Indexing with MTDaniele
           `- Re: Indexing with MTCV

1
Indexing with MT

<bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16709&group=comp.lang.xharbour#16709

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:1137:: with SMTP id p23mr6973797qkk.490.1626393414325;
Thu, 15 Jul 2021 16:56:54 -0700 (PDT)
X-Received: by 2002:a37:a98c:: with SMTP id s134mr6835478qke.57.1626393414069;
Thu, 15 Jul 2021 16:56:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 15 Jul 2021 16:56:53 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
Subject: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Thu, 15 Jul 2021 23:56:54 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: CV - Thu, 15 Jul 2021 23:56 UTC

Hi everyone

I wish to know how a simple program that builds indexes for database files can be compiled/run using MT, so, given a computer with multiple cores run in parallel at least two or three indexing operations over different databases (I'm speaking about dbf+fpt and cdx like dbfcdx).

That is, something like this:
---
wDataBases := {'DBF1', 'DBF2', 'DBF3'}
wIndexes := {'CDX1', 'CDX2', 'CDX3' }
wIndexKey := {'FLD1', 'FLD2', 'FLD3'}

for i := 1 to len(wDataBases)
select 0
use (wDataBases[i]) new exclusive
index on (wIndexKey[i]) to (wIndexes[i])
next
---
will build each index one after the other.

Then, my wish-list: building that same indexes in parallel, starting an individual thread for each database.

I don't know if this is possible, but if it is, it is worth a try.
Does someone made this?
A bit of code showing the procedure is welcome (and the libraries needed).

Best regards,
Claudio Voskian

Re: Indexing with MT

<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16710&group=comp.lang.xharbour#16710

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ac8:4741:: with SMTP id k1mr9281949qtp.374.1626443001202;
Fri, 16 Jul 2021 06:43:21 -0700 (PDT)
X-Received: by 2002:a0c:a223:: with SMTP id f32mr10396564qva.8.1626443001055;
Fri, 16 Jul 2021 06:43:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Fri, 16 Jul 2021 06:43:20 -0700 (PDT)
In-Reply-To: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com>
Subject: Re: Indexing with MT
From: dlzc1@cox.net (dlzc)
Injection-Date: Fri, 16 Jul 2021 13:43:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: dlzc - Fri, 16 Jul 2021 13:43 UTC

Dear CV:

On Thursday, July 15, 2021 at 4:56:55 PM UTC-7, CV wrote:
....
> Then, my wish-list: building that same indexes in parallel, starting
> an individual thread for each database.
>
> I don't know if this is possible, but if it is, it is worth a try.
> Does someone made this?

Do you want one thread per index per database (will be slower, since the disk will be thrashing more), or just one thread per database (easier)?

Either sequence is a linear read of the database (potential time savings), but if they are not started at the "same time" the requested record might not still be in memory. And then sorting and production of the index will really start tearing things up if you have a plattered drive.

David A. Smith

Re: Indexing with MT

<fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16711&group=comp.lang.xharbour#16711

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ae9:f447:: with SMTP id z7mr3793836qkl.453.1626448363817;
Fri, 16 Jul 2021 08:12:43 -0700 (PDT)
X-Received: by 2002:a05:620a:22e4:: with SMTP id p4mr10115033qki.131.1626448363538;
Fri, 16 Jul 2021 08:12:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Fri, 16 Jul 2021 08:12:43 -0700 (PDT)
In-Reply-To: <8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.78.21.218; posting-account=H3ofRwoAAADbRxQ3Wi989fFKCMQ4Av_J
NNTP-Posting-Host: 82.78.21.218
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com> <8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
Subject: Re: Indexing with MT
From: ellailona@gmail.com (Ella Stern)
Injection-Date: Fri, 16 Jul 2021 15:12:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Ella Stern - Fri, 16 Jul 2021 15:12 UTC

On Friday, July 16, 2021 at 4:43:21 PM UTC+3, dlzc wrote:
> Dear CV:
>
> On Thursday, July 15, 2021 at 4:56:55 PM UTC-7, CV wrote:
> ...
> > Then, my wish-list: building that same indexes in parallel, starting
> > an individual thread for each database.
> >
> > I don't know if this is possible, but if it is, it is worth a try.
> > Does someone made this?
> Do you want one thread per index per database (will be slower, since the disk will be thrashing more), or just one thread per database (easier)?
>
> Either sequence is a linear read of the database (potential time savings), but if they are not started at the "same time" the requested record might not still be in memory. And then sorting and production of the index will really start tearing things up if you have a plattered drive.
>
> David A. Smith

Table indexing is about using intensively as much as possible RAM memory in order to build aka tree structure, and saving the three to the hard disk.

When the index is too big to fit completely into the local RAM, the algorithm performs more cycles, and the users have the sensation that "the database has slowed down" (this applies both to indexing and read/write operations).

IMHO indexing more than a table at once would enforce the two programs to compete for the available RAM, and each would slow down the other.

Re: Indexing with MT

<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16712&group=comp.lang.xharbour#16712

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ad4:456d:: with SMTP id o13mr12353094qvu.48.1626471423337;
Fri, 16 Jul 2021 14:37:03 -0700 (PDT)
X-Received: by 2002:a05:620a:22e4:: with SMTP id p4mr11678697qki.131.1626471423046;
Fri, 16 Jul 2021 14:37:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Fri, 16 Jul 2021 14:37:02 -0700 (PDT)
In-Reply-To: <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com>
Subject: Re: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Fri, 16 Jul 2021 21:37:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: CV - Fri, 16 Jul 2021 21:37 UTC

El viernes, 16 de julio de 2021 a la(s) 12:12:44 UTC-3, Ella Stern escribió:
> On Friday, July 16, 2021 at 4:43:21 PM UTC+3, dlzc wrote:
> > Dear CV:
> >
> > On Thursday, July 15, 2021 at 4:56:55 PM UTC-7, CV wrote:
> > ...
> > > Then, my wish-list: building that same indexes in parallel, starting
> > > an individual thread for each database.
> > >
> > > I don't know if this is possible, but if it is, it is worth a try.
> > > Does someone made this?
> > Do you want one thread per index per database (will be slower, since the disk will be thrashing more), or just one thread per database (easier)?
> >
> > Either sequence is a linear read of the database (potential time savings), but if they are not started at the "same time" the requested record might not still be in memory. And then sorting and production of the index will really start tearing things up if you have a plattered drive.
> >
> > David A. Smith
> Table indexing is about using intensively as much as possible RAM memory in order to build aka tree structure, and saving the three to the hard disk..
>
> When the index is too big to fit completely into the local RAM, the algorithm performs more cycles, and the users have the sensation that "the database has slowed down" (this applies both to indexing and read/write operations).
>
> IMHO indexing more than a table at once would enforce the two programs to compete for the available RAM, and each would slow down the other.

Ella, David

Thank you for your answers.

The computer acting as server runs windows server, is a really fast one (12 o 16 cores), the disk is a solid state drive and has 32 gb memory, so there are almost no hardware limits.
Thinking about the xharbour application is a 32 bit one, which uses no more than 50 Mb ram in the worst case so far.

The indexing process will run at night; this application is used 24 hs a day (with remote users at home, async data downloads, etc.), I don't want to run out of time when running this automated process, that is the reason of my message/need.

Should be one thread per database; as the database is used "exclusive" for indexing (I'm sure no other process will interfere), one index after the other, but many processes running in parallel recreating a set of indexes (many orders - all of them are structural := cdx and dbf with same name).

Regards,
©

Re: Indexing with MT

<444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16713&group=comp.lang.xharbour#16713

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:101a:: with SMTP id z26mr14359327qkj.261.1626511241422;
Sat, 17 Jul 2021 01:40:41 -0700 (PDT)
X-Received: by 2002:a37:9244:: with SMTP id u65mr14225396qkd.46.1626511241131;
Sat, 17 Jul 2021 01:40:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Sat, 17 Jul 2021 01:40:40 -0700 (PDT)
In-Reply-To: <6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.78.22.148; posting-account=H3ofRwoAAADbRxQ3Wi989fFKCMQ4Av_J
NNTP-Posting-Host: 82.78.22.148
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
Subject: Re: Indexing with MT
From: ellailona@gmail.com (Ella Stern)
Injection-Date: Sat, 17 Jul 2021 08:40:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3379
 by: Ella Stern - Sat, 17 Jul 2021 08:40 UTC

Suggestion: explain to the admin that
- the indexing process needs a dedicated physical machine (NOT a VM) with a minimal Windows OS image (32 bits version) processor with many L1/L2 memory and high pace, 3 GB RAM, no Internet access, no end-user access, and your executable, which is doing ONLY the indexing, and nothing else
- before starting your executable, the necessary .DBF tables are copied onto that machine
- after the indexing completes successfully, the tables and indexes are picked up from that machine

Database server engines like Oracle and MS SQL are running on dedicated server with no connection to end-users, and each version is tied to specific OS versions and hardware, because they have some multi-threading features, which require advanced RAM and IO management.

Python and NodeJS are receiving user requests on different threads, but all those threads are using the RAM via time-sharing (one by one).

As I've mentioned, in case of indexing the critical resource is the RAM.

HTH

> Ella, David
>
> Thank you for your answers.
>
> The computer acting as server runs windows server, is a really fast one (12 o 16 cores), the disk is a solid state drive and has 32 gb memory, so there are almost no hardware limits.
> Thinking about the xharbour application is a 32 bit one, which uses no more than 50 Mb ram in the worst case so far.
>
> The indexing process will run at night; this application is used 24 hs a day (with remote users at home, async data downloads, etc.), I don't want to run out of time when running this automated process, that is the reason of my message/need.
>
> Should be one thread per database; as the database is used "exclusive" for indexing (I'm sure no other process will interfere), one index after the other, but many processes running in parallel recreating a set of indexes (many orders - all of them are structural := cdx and dbf with same name).
>
> Regards,
> ©

Re: Indexing with MT

<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16714&group=comp.lang.xharbour#16714

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:2d04:: with SMTP id t4mr15660185qkh.160.1626529856872; Sat, 17 Jul 2021 06:50:56 -0700 (PDT)
X-Received: by 2002:a37:b145:: with SMTP id a66mr15558795qkf.329.1626529856611; Sat, 17 Jul 2021 06:50:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Sat, 17 Jul 2021 06:50:56 -0700 (PDT)
In-Reply-To: <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com> <8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com> <6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com> <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com>
Subject: Re: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Sat, 17 Jul 2021 13:50:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 60
 by: CV - Sat, 17 Jul 2021 13:50 UTC

El sábado, 17 de julio de 2021 a la(s) 05:40:42 UTC-3, Ella Stern escribió:
> Suggestion: explain to the admin that
> - the indexing process needs a dedicated physical machine (NOT a VM) with a minimal Windows OS image (32 bits version) processor with many L1/L2 memory and high pace, 3 GB RAM, no Internet access, no end-user access, and your executable, which is doing ONLY the indexing, and nothing else
> - before starting your executable, the necessary .DBF tables are copied onto that machine
> - after the indexing completes successfully, the tables and indexes are picked up from that machine
>
> Database server engines like Oracle and MS SQL are running on dedicated server with no connection to end-users, and each version is tied to specific OS versions and hardware, because they have some multi-threading features, which require advanced RAM and IO management.
>
> Python and NodeJS are receiving user requests on different threads, but all those threads are using the RAM via time-sharing (one by one).
>
> As I've mentioned, in case of indexing the critical resource is the RAM.
>
> HTH
> > Ella, David
> >
> > Thank you for your answers.
> >
> > The computer acting as server runs windows server, is a really fast one (12 o 16 cores), the disk is a solid state drive and has 32 gb memory, so there are almost no hardware limits.
> > Thinking about the xharbour application is a 32 bit one, which uses no more than 50 Mb ram in the worst case so far.
> >
> > The indexing process will run at night; this application is used 24 hs a day (with remote users at home, async data downloads, etc.), I don't want to run out of time when running this automated process, that is the reason of my message/need.
> >
> > Should be one thread per database; as the database is used "exclusive" for indexing (I'm sure no other process will interfere), one index after the other, but many processes running in parallel recreating a set of indexes (many orders - all of them are structural := cdx and dbf with same name)..
> >
> > Regards,
> > ©
Ella

Thank you for your explanation.

No VM machines on that server, plenty of ram, enough speed in disk access.... almost no limits in hardware.
The only limit is the available time frame to rebuild indexes in case it is needed.

How about a piece of code to do what I need to implement (or test)?
Is xharbour able to do that without errors?

Regards
Claudio Voskian

Re: Indexing with MT

<scvejv$9b1$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16715&group=comp.lang.xharbour#16715

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: webmaster@appliserver.com (Daniele)
Newsgroups: comp.lang.xharbour
Subject: Re: Indexing with MT
Date: Sat, 17 Jul 2021 22:29:49 +0200
Organization: A noiseless patient Spider
Lines: 83
Message-ID: <scvejv$9b1$1@dont-email.me>
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com>
<fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com>
<444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 17 Jul 2021 20:29:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="9cee2d76bab3f54f3d5cd98579fe3b71";
logging-data="9569"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pfWHK/h0cG6pCWEuMgTv/"
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:LQzj1MyhVwfEC50nGf68sVInRBY=
In-Reply-To: <72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com>
Content-Language: it
 by: Daniele - Sat, 17 Jul 2021 20:29 UTC

Il 17/07/2021 15:50, CV ha scritto:
> El sábado, 17 de julio de 2021 a la(s) 05:40:42 UTC-3, Ella Stern escribió:
>> Suggestion: explain to the admin that
>> - the indexing process needs a dedicated physical machine (NOT a VM) with a minimal Windows OS image (32 bits version) processor with many L1/L2 memory and high pace, 3 GB RAM, no Internet access, no end-user access, and your executable, which is doing ONLY the indexing, and nothing else
>> - before starting your executable, the necessary .DBF tables are copied onto that machine
>> - after the indexing completes successfully, the tables and indexes are picked up from that machine
>>
>> Database server engines like Oracle and MS SQL are running on dedicated server with no connection to end-users, and each version is tied to specific OS versions and hardware, because they have some multi-threading features, which require advanced RAM and IO management.
>>
>> Python and NodeJS are receiving user requests on different threads, but all those threads are using the RAM via time-sharing (one by one).
>>
>> As I've mentioned, in case of indexing the critical resource is the RAM.
>>
>> HTH
>>> Ella, David
>>>
>>> Thank you for your answers.
>>>
>>> The computer acting as server runs windows server, is a really fast one (12 o 16 cores), the disk is a solid state drive and has 32 gb memory, so there are almost no hardware limits.
>>> Thinking about the xharbour application is a 32 bit one, which uses no more than 50 Mb ram in the worst case so far.
>>>
>>> The indexing process will run at night; this application is used 24 hs a day (with remote users at home, async data downloads, etc.), I don't want to run out of time when running this automated process, that is the reason of my message/need.
>>>
>>> Should be one thread per database; as the database is used "exclusive" for indexing (I'm sure no other process will interfere), one index after the other, but many processes running in parallel recreating a set of indexes (many orders - all of them are structural := cdx and dbf with same name).
>>>
>>> Regards,
>>> ©
> Ella
>
> Thank you for your explanation.
>
> No VM machines on that server, plenty of ram, enough speed in disk access... almost no limits in hardware.
> The only limit is the available time frame to rebuild indexes in case it is needed.
>
> How about a piece of code to do what I need to implement (or test)?
> Is xharbour able to do that without errors?
>
> Regards
> Claudio Voskian
>
Try it yourself adapting this pseudocode:

#ifdef __XHARBOUR__
#xtranslate hb_threadStart( <x,...> ) => StartThread( <x> )
#endif
#include "hbthread.ch"

procedure main
....
// test monothread
start_time:=seconds()
? "start single thread "+ time()
index1()
index2()
elap_time=seconds()
? "End:"+time()+" seconds:"+dctrim(elap_time-start_time)

? "Start multithread:"+ time()

? "Start thread 1:"+ time()
hb_threadStart( HB_THREAD_INHERIT_PUBLIC , @index1() )
? "Start thread 2:"+ time()
hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @index2() )

wait ""
return

func index1()
local start_time:=seconds(),elap_time
ferase index
use ... exclusive
index on...
use
elap_time=seconds()
? "End thread 1:"+time()+" seconds:"+dctrim(elap_time-start_time)
return nil

func index2()
....the same
return nil

Let us know
Dan

Re: Indexing with MT

<c953aab7-98f3-45aa-82e6-a2dc5aab7cbfn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16716&group=comp.lang.xharbour#16716

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:129a:: with SMTP id w26mr17430568qki.330.1626575951207; Sat, 17 Jul 2021 19:39:11 -0700 (PDT)
X-Received: by 2002:ac8:764a:: with SMTP id i10mr6503195qtr.2.1626575950912; Sat, 17 Jul 2021 19:39:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Sat, 17 Jul 2021 19:39:10 -0700 (PDT)
In-Reply-To: <scvejv$9b1$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com> <8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com> <6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com> <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com> <72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com> <scvejv$9b1$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c953aab7-98f3-45aa-82e6-a2dc5aab7cbfn@googlegroups.com>
Subject: Re: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Sun, 18 Jul 2021 02:39:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 121
 by: CV - Sun, 18 Jul 2021 02:39 UTC

El sábado, 17 de julio de 2021 a la(s) 17:29:53 UTC-3, Daniele escribió:
> Il 17/07/2021 15:50, CV ha scritto:
> > El sábado, 17 de julio de 2021 a la(s) 05:40:42 UTC-3, Ella Stern escribió:
> >> Suggestion: explain to the admin that
> >> - the indexing process needs a dedicated physical machine (NOT a VM) with a minimal Windows OS image (32 bits version) processor with many L1/L2 memory and high pace, 3 GB RAM, no Internet access, no end-user access, and your executable, which is doing ONLY the indexing, and nothing else
> >> - before starting your executable, the necessary .DBF tables are copied onto that machine
> >> - after the indexing completes successfully, the tables and indexes are picked up from that machine
> >>
> >> Database server engines like Oracle and MS SQL are running on dedicated server with no connection to end-users, and each version is tied to specific OS versions and hardware, because they have some multi-threading features, which require advanced RAM and IO management.
> >>
> >> Python and NodeJS are receiving user requests on different threads, but all those threads are using the RAM via time-sharing (one by one).
> >>
> >> As I've mentioned, in case of indexing the critical resource is the RAM.
> >>
> >> HTH
> >>> Ella, David
> >>>
> >>> Thank you for your answers.
> >>>
> >>> The computer acting as server runs windows server, is a really fast one (12 o 16 cores), the disk is a solid state drive and has 32 gb memory, so there are almost no hardware limits.
> >>> Thinking about the xharbour application is a 32 bit one, which uses no more than 50 Mb ram in the worst case so far.
> >>>
> >>> The indexing process will run at night; this application is used 24 hs a day (with remote users at home, async data downloads, etc.), I don't want to run out of time when running this automated process, that is the reason of my message/need.
> >>>
> >>> Should be one thread per database; as the database is used "exclusive" for indexing (I'm sure no other process will interfere), one index after the other, but many processes running in parallel recreating a set of indexes (many orders - all of them are structural := cdx and dbf with same name).
> >>>
> >>> Regards,
> >>> ©
> > Ella
> >
> > Thank you for your explanation.
> >
> > No VM machines on that server, plenty of ram, enough speed in disk access... almost no limits in hardware.
> > The only limit is the available time frame to rebuild indexes in case it is needed.
> >
> > How about a piece of code to do what I need to implement (or test)?
> > Is xharbour able to do that without errors?
> >
> > Regards
> > Claudio Voskian
> >
> Try it yourself adapting this pseudocode:
>
> #ifdef __XHARBOUR__
> #xtranslate hb_threadStart( <x,...> ) => StartThread( <x> )
> #endif
> #include "hbthread.ch"
>
> procedure main
> ...
> // test monothread
> start_time:=seconds()
> ? "start single thread "+ time()
> index1()
> index2()
> elap_time=seconds()
> ? "End:"+time()+" seconds:"+dctrim(elap_time-start_time)
>
> ? "Start multithread:"+ time()
>
> ? "Start thread 1:"+ time()
> hb_threadStart( HB_THREAD_INHERIT_PUBLIC , @index1() )
> ? "Start thread 2:"+ time()
> hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @index2() )
>
> wait ""
> return
>
> func index1()
> local start_time:=seconds(),elap_time
> ferase index
> use ... exclusive
> index on...
> use
> elap_time=seconds()
> ? "End thread 1:"+time()+" seconds:"+dctrim(elap_time-start_time)
> return nil
>
> func index2()
> ...the same
> return nil
>
> Let us know
> Dan

Hi Dan!

Thank you for the code, but: how is it supposed to open "exclusively" the same file in two threads?
That is, this instruction should be common to both threads, but executed only once before starting anything else:
> use ... exclusive
Anyway I will try to adapt it to my needs.

Regards,
Claudio Voskian

Re: Indexing with MT

<809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16717&group=comp.lang.xharbour#16717

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:b6c5:: with SMTP id g188mr20958178qkf.92.1626658766801;
Sun, 18 Jul 2021 18:39:26 -0700 (PDT)
X-Received: by 2002:ad4:5426:: with SMTP id g6mr22463077qvt.47.1626658766542;
Sun, 18 Jul 2021 18:39:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Sun, 18 Jul 2021 18:39:26 -0700 (PDT)
In-Reply-To: <scvejv$9b1$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com> <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com> <scvejv$9b1$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com>
Subject: Re: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Mon, 19 Jul 2021 01:39:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: CV - Mon, 19 Jul 2021 01:39 UTC

El sábado, 17 de julio de 2021 a la(s) 17:29:53 UTC-3, Daniele escribió:
> Il 17/07/2021 15:50, CV ha scritto:
> > El sábado, 17 de julio de 2021 a la(s) 05:40:42 UTC-3, Ella Stern escribió:
> >> Suggestion: explain to the admin that
> >> - the indexing process needs a dedicated physical machine (NOT a VM) with a minimal Windows OS image (32 bits version) processor with many L1/L2 memory and high pace, 3 GB RAM, no Internet access, no end-user access, and your executable, which is doing ONLY the indexing, and nothing else
> >> - before starting your executable, the necessary .DBF tables are copied onto that machine
> >> - after the indexing completes successfully, the tables and indexes are picked up from that machine
> >>
> >> Database server engines like Oracle and MS SQL are running on dedicated server with no connection to end-users, and each version is tied to specific OS versions and hardware, because they have some multi-threading features, which require advanced RAM and IO management.
> >>
> >> Python and NodeJS are receiving user requests on different threads, but all those threads are using the RAM via time-sharing (one by one).
> >>
> >> As I've mentioned, in case of indexing the critical resource is the RAM.
> >>
> >> HTH
> >>> Ella, David
> >>>
> >>> Thank you for your answers.
> >>>
> >>> The computer acting as server runs windows server, is a really fast one (12 o 16 cores), the disk is a solid state drive and has 32 gb memory, so there are almost no hardware limits.
> >>> Thinking about the xharbour application is a 32 bit one, which uses no more than 50 Mb ram in the worst case so far.
> >>>
> >>> The indexing process will run at night; this application is used 24 hs a day (with remote users at home, async data downloads, etc.), I don't want to run out of time when running this automated process, that is the reason of my message/need.
> >>>
> >>> Should be one thread per database; as the database is used "exclusive" for indexing (I'm sure no other process will interfere), one index after the other, but many processes running in parallel recreating a set of indexes (many orders - all of them are structural := cdx and dbf with same name).
> >>>
> >>> Regards,
> >>> ©
> > Ella
> >
> > Thank you for your explanation.
> >
> > No VM machines on that server, plenty of ram, enough speed in disk access... almost no limits in hardware.
> > The only limit is the available time frame to rebuild indexes in case it is needed.
> >
> > How about a piece of code to do what I need to implement (or test)?
> > Is xharbour able to do that without errors?
> >
> > Regards
> > Claudio Voskian
> >
> Try it yourself adapting this pseudocode:
>
> #ifdef __XHARBOUR__
> #xtranslate hb_threadStart( <x,...> ) => StartThread( <x> )
> #endif
> #include "hbthread.ch"
>
> procedure main
> ...
> // test monothread
> start_time:=seconds()
> ? "start single thread "+ time()
> index1()
> index2()
> elap_time=seconds()
> ? "End:"+time()+" seconds:"+dctrim(elap_time-start_time)
>
> ? "Start multithread:"+ time()
>
> ? "Start thread 1:"+ time()
> hb_threadStart( HB_THREAD_INHERIT_PUBLIC , @index1() )
> ? "Start thread 2:"+ time()
> hb_threadStart( HB_THREAD_INHERIT_PUBLIC, @index2() )
>
> wait ""
> return
>
> func index1()
> local start_time:=seconds(),elap_time
> ferase index
> use ... exclusive
> index on...
> use
> elap_time=seconds()
> ? "End thread 1:"+time()+" seconds:"+dctrim(elap_time-start_time)
> return nil
>
> func index2()
> ...the same
> return nil
>
> Let us know
> Dan

Hi everyone

After some testings and adapting the code to xharbour, I just receive an error in a windows message box:
"hb_xrealloc can't reallocate memory."

With this text written in the console:
Unrecoverable error 9009: Unrecoverable error 9011: hb_xrealloc can't reallocate memoryhb_xfree called with a NULL pointer Called from INDEX1(49)Called from INDEX2(0)
Called from ORDCREATE(0)Called from ORDCREATE(0)
Called from INDEX1(49)Called from INDEX2(76)

The code:
* request dbfcdx
proc main()
? "Start thread 1:", seconds()
StartThread(@index1())
return
* function index1()
local start_time:=seconds(),elap_time

ferase ('his_jude.cdx')
ferase ('his_jude1.cdx')

use his_jude exclusive new via 'dbfcdx'
index on STR(NRO_DEUDOR)+DTOS(FECHA) tag 'GJE_DEUDOR' to 'HIS_JUDE'
index on STR(NRO_DEUDOR)+EST_CARTA+DTOS(FECHA)+LEFT(TELEFONO,13) tag 'GJE_DEUETA' to 'HIS_JUDE' additive
index on FECHA tag 'GJE_FECHA' to 'HIS_JUDE1'
index on ARCHIVOCAM+str(NRO_DEUDOR)+left(TELEFONO,13) tag 'GJE_ARCHIV' to 'HIS_JUDE1' additive
index on ID_BML tag 'GJE_IDBML' to 'HIS_JUDE1' additive unique
use
elap_time := seconds()
? "End thread 1:"+time()+" seconds:"+str(elap_time-start_time)
return nil

And no index created.

If it is so difficult to build a simple index, I can't use MT in any other process.
Don't want to have a headache, so my simple solution: starting a couple of external programs from inside the application to pack and build indexes using shellexecute().

Regards
Claudio Voskian

Re: Indexing with MT

<sd3s72$qam$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16720&group=comp.lang.xharbour#16720

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: webmaster@appliserver.com (Daniele)
Newsgroups: comp.lang.xharbour
Subject: Re: Indexing with MT
Date: Mon, 19 Jul 2021 14:46:22 +0200
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <sd3s72$qam$1@dont-email.me>
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com>
<fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com>
<444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com>
<scvejv$9b1$1@dont-email.me>
<809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Jul 2021 12:46:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2febddce2ba20eb61a935f8a7c463051";
logging-data="26966"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NDNQKQOT4XE/wCJQdc2tO"
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:7e1l9mL6bclmO+3pUYnZHkE33o8=
In-Reply-To: <809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com>
Content-Language: it
 by: Daniele - Mon, 19 Jul 2021 12:46 UTC

Il 19/07/2021 03:39, CV ha scritto:

> StartThread(@index1())
> return

So you start the thread and then exit. How can it work?

StartThread(@index1())
wait "Press a key"
return

Anyway, such a code is just for testing, eh.
Dan

Re: Indexing with MT

<31ba8991-5892-4933-9471-6572e19b7876n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16721&group=comp.lang.xharbour#16721

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:31a1:: with SMTP id bi33mr7800898qkb.146.1626712667256;
Mon, 19 Jul 2021 09:37:47 -0700 (PDT)
X-Received: by 2002:ac8:75c2:: with SMTP id z2mr22515719qtq.303.1626712666988;
Mon, 19 Jul 2021 09:37:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Mon, 19 Jul 2021 09:37:46 -0700 (PDT)
In-Reply-To: <sd3s72$qam$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com> <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com> <scvejv$9b1$1@dont-email.me>
<809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com> <sd3s72$qam$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <31ba8991-5892-4933-9471-6572e19b7876n@googlegroups.com>
Subject: Re: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Mon, 19 Jul 2021 16:37:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: CV - Mon, 19 Jul 2021 16:37 UTC

El lunes, 19 de julio de 2021 a la(s) 09:46:27 UTC-3, Daniele escribió:
> Il 19/07/2021 03:39, CV ha scritto:
>
> > StartThread(@index1())
> > return
>
> So you start the thread and then exit. How can it work?
>
> StartThread(@index1())
> wait "Press a key"
> return
>
> Anyway, such a code is just for testing, eh.
> Dan

Dan

It was a copy and paste with missing lines, I have the wait "" before the end of the main routine, and there are 2 indexing functions for different databases (while I just copied one for the example, the other is identical).

When I start the 2 threads *sometimes* the error message occurs.
Other times just does nothing at all, I have to close the application with [X] upper right control.

Regards
Claudio Voskian

Re: Indexing with MT

<9926c563-9fbe-48eb-9169-166028a46863n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16727&group=comp.lang.xharbour#16727

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:622a:1a11:: with SMTP id f17mr31007000qtb.308.1626872713220;
Wed, 21 Jul 2021 06:05:13 -0700 (PDT)
X-Received: by 2002:ac8:58d3:: with SMTP id u19mr28351270qta.306.1626872712598;
Wed, 21 Jul 2021 06:05:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Wed, 21 Jul 2021 06:05:12 -0700 (PDT)
In-Reply-To: <31ba8991-5892-4933-9471-6572e19b7876n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com> <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com> <scvejv$9b1$1@dont-email.me>
<809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com> <sd3s72$qam$1@dont-email.me>
<31ba8991-5892-4933-9471-6572e19b7876n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9926c563-9fbe-48eb-9169-166028a46863n@googlegroups.com>
Subject: Re: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Wed, 21 Jul 2021 13:05:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: CV - Wed, 21 Jul 2021 13:05 UTC

El lunes, 19 de julio de 2021 a la(s) 13:37:47 UTC-3, CV escribió:
> El lunes, 19 de julio de 2021 a la(s) 09:46:27 UTC-3, Daniele escribió:
> > Il 19/07/2021 03:39, CV ha scritto:
> >
> > > StartThread(@index1())
> > > return
> >
> > So you start the thread and then exit. How can it work?
> >
> > StartThread(@index1())
> > wait "Press a key"
> > return
> >
> > Anyway, such a code is just for testing, eh.
> > Dan
> Dan
>
> It was a copy and paste with missing lines, I have the wait "" before the end of the main routine, and there are 2 indexing functions for different databases (while I just copied one for the example, the other is identical)..
>
> When I start the 2 threads *sometimes* the error message occurs.
> Other times just does nothing at all, I have to close the application with [X] upper right control.
>
> Regards
> Claudio Voskian

Hi everyone, Dan specially

I don't know why, but the very same program that previously DOESN'T work, now works properly.
I didn't change a line, tried to test it yesterday and ... WORKS.
A mistery.

Thank you for the code!

Regards
Claudio Voskian

Re: Indexing with MT

<sdciiv$iio$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16729&group=comp.lang.xharbour#16729

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: webmaster@appliserver.com (Daniele)
Newsgroups: comp.lang.xharbour
Subject: Re: Indexing with MT
Date: Thu, 22 Jul 2021 21:57:13 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <sdciiv$iio$1@dont-email.me>
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com>
<fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com>
<444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com>
<scvejv$9b1$1@dont-email.me>
<809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com>
<sd3s72$qam$1@dont-email.me>
<31ba8991-5892-4933-9471-6572e19b7876n@googlegroups.com>
<9926c563-9fbe-48eb-9169-166028a46863n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 22 Jul 2021 19:57:19 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="832ed70721244bb29b7ca3ad89b0fc95";
logging-data="19032"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vQib1MrRxFN8hZvy10ncy"
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Cancel-Lock: sha1:1wgwsSkLV6vg2umj5zjHyQ8llXY=
In-Reply-To: <9926c563-9fbe-48eb-9169-166028a46863n@googlegroups.com>
Content-Language: it
 by: Daniele - Thu, 22 Jul 2021 19:57 UTC

Il 21/07/2021 15:05, CV ha scritto:

>>
>> When I start the 2 threads *sometimes* the error message occurs.
>> Other times just does nothing at all, I have to close the application with [X] upper right control.
>>
>> Regards
>> Claudio Voskian
>
> Hi everyone, Dan specially
>
> I don't know why, but the very same program that previously DOESN'T work, now works properly.
> I didn't change a line, tried to test it yesterday and ... WORKS.
> A mistery.

Well, I did not believe the two threads indexing the same file would
have succeeded. I was thinking of 2 different files!
I learned something. :-)

>
> Thank you for the code!
>
> Regards
> Claudio Voskian
>
You are welcome.
Dan

Re: Indexing with MT

<d905607b-7c2f-46cd-9dd7-3afdf47bfd31n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16730&group=comp.lang.xharbour#16730

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ac8:e08:: with SMTP id a8mr1789146qti.346.1626993654052;
Thu, 22 Jul 2021 15:40:54 -0700 (PDT)
X-Received: by 2002:a05:620a:1090:: with SMTP id g16mr2002448qkk.256.1626993653787;
Thu, 22 Jul 2021 15:40:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 22 Jul 2021 15:40:53 -0700 (PDT)
In-Reply-To: <sdciiv$iio$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=186.136.200.215; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 186.136.200.215
References: <bdd47bca-b8e8-4e77-85e0-988093d4f00cn@googlegroups.com>
<8ac8cbb0-7b55-49fa-a57d-e1d047bbfe49n@googlegroups.com> <fd51bf5c-bd27-4719-ad44-df41c9f2bf49n@googlegroups.com>
<6bcb8a64-e5ef-4579-99c7-be4ac3ad8614n@googlegroups.com> <444d7c65-5ec4-48c5-ad61-01fccd384456n@googlegroups.com>
<72314859-c843-469b-afcf-ebf8d5393814n@googlegroups.com> <scvejv$9b1$1@dont-email.me>
<809ea1ab-8a10-41aa-b118-25aea174277an@googlegroups.com> <sd3s72$qam$1@dont-email.me>
<31ba8991-5892-4933-9471-6572e19b7876n@googlegroups.com> <9926c563-9fbe-48eb-9169-166028a46863n@googlegroups.com>
<sdciiv$iio$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d905607b-7c2f-46cd-9dd7-3afdf47bfd31n@googlegroups.com>
Subject: Re: Indexing with MT
From: cvoskian@gmail.com (CV)
Injection-Date: Thu, 22 Jul 2021 22:40:54 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: CV - Thu, 22 Jul 2021 22:40 UTC

El jueves, 22 de julio de 2021 a la(s) 16:57:21 UTC-3, Daniele escribió:
> Il 21/07/2021 15:05, CV ha scritto:
>
> >>
> >> When I start the 2 threads *sometimes* the error message occurs.
> >> Other times just does nothing at all, I have to close the application with [X] upper right control.
> >>
> >> Regards
> >> Claudio Voskian
> >
> > Hi everyone, Dan specially
> >
> > I don't know why, but the very same program that previously DOESN'T work, now works properly.
> > I didn't change a line, tried to test it yesterday and ... WORKS.
> > A mistery.
> Well, I did not believe the two threads indexing the same file would
> have succeeded. I was thinking of 2 different files!
> I learned something. :-)
> >
> > Thank you for the code!
> >
> > Regards
> > Claudio Voskian
> >
> You are welcome.
> Dan

Dan
I used two different threads using TWO different files and indexes.
Doing the same process over the same file at the same time is non-sense.

Regards
©

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor