Is it possible to add an index online in 11.7?

Posted by Dmitri Levin on 20-Apr-2017 14:09

I would say "YES" and "NO".

Yes because I just did it. No because it was not as easy as I was thinking it would be in 11.7.

So I started 11.7 database with -usernotifytime 600 paramter. ( 600 sec = 10 minutes it is )

Then added an index inactive.

Then just before running idxactivate I changed in promon R&D 4/7/8 User notify time 60 seconds ( 1 min ).

Run idxactivate. First I got the list of 100 processes

OpenEdge Release 11.7 as of Fri Mar 17 19:00:35 EDT 2017

Index Activate: Primary index in use for building keys. (14815)
Index Activate: index order-data-ix in use for building keys. (15883)
Index Activate: BEGIN activation of order-data-pk. (13258)
Index Activate: recs value: 100 refresh rate: 10. (13259)
Index record(s) updated at timestamp 1492712916. (18223)
Usr Name Type Pid Timestamp

24 alpbatch ABL 46727392 1492312983
25 alpbatch ABL 59900078 1492312983

etc

Connections with timestamps older than 1492712916 exist. (13246)
Do you wish to continue waiting..... Type y to continue (y/n). (13247)

y

I answered "y" several times. After that the list became much smaller.

I was expecting that after 1 minute the list will be empty and process will finish. That did not happen.

About 10 processes (webspeed and users) were still there after several minutes. More than likely those processes were idle. After I manually disconnected those 10 processes from the database idxactivate successfully finished.

Usr Name Type Pid Timestamp

320 p2sqlsvc ABL 6568 1492312983  <-- that is Pro2sql running on a Windows somewhere else was last one I disconnected


Connections with timestamps older than 1492712916 exist. (13246)
Do you wish to continue waiting..... Type y to continue (y/n). (13247)
y
Index Activate: Index order-data-pk No. 2394 - 0 keys added. (13244)
Index Activate: Index order-data-pk No. 2394 - 0 keys processed. (13245)
Index Activate: Index order-data-pk has been activated. (15878)

So it works.

Can it be improved? 

Do I need to set -usernotifytime 600 paramter for each and every 4GL client? I thought that is a server parameter since it is in promon Administrative Functions.

Posted by Richard Banville on 20-Apr-2017 14:22

You do not need to set it per client.

The startup parameter documentation is not clear that the new notify value only takes affect after the current client's notify time has expired.  That is even though the server's notify time has changed, the client will not check for notification until its current notify time is exhausted.

If you startup with 10 minutes, change it to 1 minute you may need to wait a maximum of 10 minutes before the clients check for notification.  After that, the notify should take effect every minute.

Idle clients are not supposed to block this from continue as they are in a poll loop, even if in a pause().

There are some activities which the client cannot be interrupted immediately and even though notified, the notification will not be honored immediately but they "should" be rare.

I don't know about the web speed clients.  I would hope that they were considered but I will have to check on that.

All Replies

Posted by Richard Banville on 20-Apr-2017 14:22

You do not need to set it per client.

The startup parameter documentation is not clear that the new notify value only takes affect after the current client's notify time has expired.  That is even though the server's notify time has changed, the client will not check for notification until its current notify time is exhausted.

If you startup with 10 minutes, change it to 1 minute you may need to wait a maximum of 10 minutes before the clients check for notification.  After that, the notify should take effect every minute.

Idle clients are not supposed to block this from continue as they are in a poll loop, even if in a pause().

There are some activities which the client cannot be interrupted immediately and even though notified, the notification will not be honored immediately but they "should" be rare.

I don't know about the web speed clients.  I would hope that they were considered but I will have to check on that.

Posted by Dmitri Levin on 20-Apr-2017 14:36

Thank you Rich. I thought so.

So next time I will change -usernotifytime to 60 (1 minute) and wait until it is in effect ( old value time passed ) before I start adding a new index. I will report how it goes.

Thank you for implementing it. Now when we can add everything online I hope we will be able to update table online too some day. Add triggers will be next in line for us. Then drop index/column/table.

Posted by Richard Banville on 20-Apr-2017 16:29

Speaking for Progress, you are welcome.

Kyle Monico and Rich Tucker were the key developers who implemented this feature for us.

Please keep the feedback coming.

This thread is closed