Corrupted index that won't fix

2017-05-20 Thread Kirk Brooks via 4D_Tech
I verified a data file and MSC reported the data were fine but the indexes
had some errors. No problem, I think, I'll just trash the index files,
restart and let them rebuild. After doing this twice the indexes are still
showing as :

Cluster Index 167 on DOX_ATTACH._data , DOX_ATTACH.record_id
(tableName_recordId) [OK]
Checking index Cluster Index 167 on DOX_ATTACH._data , DOX_ATTACH.record_id
(tableName_recordId) [OK]
Checking index page addresses on Cluster Index 167 on DOX_ATTACH._data ,
DOX_ATTACH.record_id (tableName_recordId) [OK]
Checking clusters on Cluster Index 167 on DOX_ATTACH._data ,
DOX_ATTACH.record_id (tableName_recordId) [OK]
Checking list of deleted clusters on Cluster Index 167 on DOX_ATTACH._data
, DOX_ATTACH.record_id (tableName_recordId) [OK]
Checking index pages on Cluster Index 167 on DOX_ATTACH._data ,
DOX_ATTACH.record_id (tableName_recordId) [200 errors]

I'm not sure what else to do besides dropping the index. I'm assuming,
perhaps incorrectly, that if the data are good the index should be able to
write itself correctly.

I'm hoping one of you can give me some insight into how to correct this.
The server is running 15.3 on Win 7.

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Exploring CALL WORKER vs New process

2017-05-20 Thread Kirk Brooks via 4D_Tech
Tim,
I'm glad you reminded me of this one. I don't have problems with sending
emails so much but the process for downloading them caused problems. I
actually split that process off into a separate database - the downloads
get processed into a watched folder. One of my first thoughts was to split
that task into a preemptive process but I see that won't do any good for
the time being.

On Sat, May 20, 2017 at 12:54 AM, Tim Nevels via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Another area is with plugin calls like 4D Internet Commands -- in
> particular the email commands. Many of them can block 4D waiting for a
> reply from the email server. And since currently all plugin calls happen
> running in the cooperative mode they block every process while waiting for
> that slow email server.
>
> So if you are trying to send an email from 4D Server this blocking effects
> ALL users. Users experience intermittent slowdowns and don't know why. I
> had one situation where I had to move all email operations from 4D Server
> to a 4D Client slave to stop this.
>

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Exploring CALL WORKER vs New process

2017-05-20 Thread Keith Culotta via 4D_Tech

That was a kind of mashup of several ideas, but you covered them in the 
preceding paragraph.  
Thanks for the observations.

Keith - CDI

> On May 19, 2017, at 5:41 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> You call a window, not a form, not process. That's precisely so that you
> can specify which window in a process you're trying to send the code to for
> execution. If you aren't using multiple windows in a single process or if
> you aren't using 'form variables', then it makes no difference.
> 
> * The code executes in the context of the _process_ holding the
> window/form. No matter which window/form it is.
> * The code has access to the form variables of the form in the specified
> window, if you want them.
> 
> A form's local variables are outside the purview of the "Worker called".
>> No event is triggered.  Any variable changed need a Call Process (-1) for
>> their display to change.
>> On the other hand, this is where form object names make the context
>> significant?
>> 
> 
> I don't think that I follow what you're saying here.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Primary key contains duplicate values

2017-05-20 Thread Arnaud de Montard via 4D_Tech

> Le 20 mai 2017 à 01:24, Douglas von Roeder via 4D_Tech <4d_tech@lists.4d.com> 
> a écrit :
> 
> Ronald:
> 
> Distinct values is a good suggestion - it will be interesting to see what's
> in some of the fields but not the others.

From the doc, DISTINCT VALUES uses the index when it exists. Deleting/fixing 
the index before DISTINCT VALUES could help to discriminate if the issue is ( 
field duplicates | index corruption ). 

-- 
Arnaud de Montard 



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Exploring CALL WORKER vs New process

2017-05-20 Thread David Adams via 4D_Tech
Nice one Tim. I have no idea when/if they'll free up 4DIC to run in
preemptive mode (on another core), or allow plug-ins to do so generally.
Since the answer is possibly "never" and is definitely "not at the moment",
there _is _ something you can do. The docs say that HTTP Request and HTTP
Get work today in preemptive mode. (Note: I haven't verified this myself,
but I'm pretty sure the docs are right.) Depending on how much trouble it's
worth to you, you can push your email queue out with a preemptive worker.
Instead of doing right to your IMAP/SMTP server, you can:

* Push data up to MailChip, etc. There are lots of services out there these
days.
* Push the data up to a stand-alone copy of 4D running somewhere on your
network. It gets the data and can reuse your existing 4DIC code normally.
So:

Busy Database
  --> CALL WORKER to a preemptive thread
  --> HTTP Request to push data to stand alone 4D
--> Web server catches data
 --> 4DIC calls like normal

What could be simpler! ;-) It's not that bad if you can compile your
existing source into a special stand-alone build that has a Web server. My
main database source compiles to about 8 different projects at the moment.

Yeah, it would be nice to have 4DIC, etc., but at least there is an option
now - if it's worth the trouble in your case.

P.S. I suspect what I've just described might fit in nicely with what your
working on...
P.P.S. You can cut out the whole CALL WORKER --> HTTP Request bit and just
do the HTTP Request bit locally, but it might be nice to use CALL WORKER
here. It unblocks your main code and should work very smoothly and quickly.
Delegating the email dispatch to a second machine running it's own 4D build
removes the blocking from the busy system entirely. If you have a ton of
mail (or whatever, SMS messages, Web updates, etc.), you can put a few
stand-alone machines into rotation.

On Sat, May 20, 2017 at 5:54 PM, Tim Nevels via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> On May 20, 2017, at 1:25 AM, David Adams wrote:
>
> > Delegating various file system calls to a worker is, in my opinion, a
> solid
> > idea. Particularly if the operation is blocking, or if you find yourself
> > constantly fighting/waiting for a read lock on the file. (Like the log
> > example I go back to all of the time.)
>
> Another area is with plugin calls like 4D Internet Commands -- in
> particular the email commands. Many of them can block 4D waiting for a
> reply from the email server. And since currently all plugin calls happen
> running in the cooperative mode they block every process while waiting for
> that slow email server.
>
> So if you are trying to send an email from 4D Server this blocking effects
> ALL users. Users experience intermittent slowdowns and don't know why. I
> had one situation where I had to move all email operations from 4D Server
> to a 4D Client slave to stop this.
>
> So once 4D updates 4D Internet Commands to run in preemptive mode -- if
> that is even possible -- or adds native commands to 4D to replace 4D
> Internet Commands that will be a great thing to push off to a worker. No
> more blocking from slow email servers.
>
> Tim
>
> Sent from my iPad
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Exploring CALL WORKER vs New process

2017-05-20 Thread Tim Nevels via 4D_Tech
On May 20, 2017, at 1:25 AM, David Adams wrote:

> Delegating various file system calls to a worker is, in my opinion, a solid
> idea. Particularly if the operation is blocking, or if you find yourself
> constantly fighting/waiting for a read lock on the file. (Like the log
> example I go back to all of the time.)

Another area is with plugin calls like 4D Internet Commands -- in particular 
the email commands. Many of them can block 4D waiting for a reply from the 
email server. And since currently all plugin calls happen running in the 
cooperative mode they block every process while waiting for that slow email 
server. 

So if you are trying to send an email from 4D Server this blocking effects ALL 
users. Users experience intermittent slowdowns and don't know why. I had one 
situation where I had to move all email operations from 4D Server to a 4D 
Client slave to stop this. 

So once 4D updates 4D Internet Commands to run in preemptive mode -- if that is 
even possible -- or adds native commands to 4D to replace 4D Internet Commands 
that will be a great thing to push off to a worker. No more blocking from slow 
email servers. 

Tim

Sent from my iPad
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**